[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Scoped variable *toclose syntax
- From: Dibyendu Majumdar <mobile@...>
- Date: Thu, 25 Apr 2019 17:41:25 +0100
On Thu, 25 Apr 2019 at 17:29, Sean Conner <sean@conman.org> wrote:
> So I'm looking at Java because they now have annotations. From a cursory
> look, it appears the syntax to be:
>
> '@' ID
>
> So things like
>
> @Override
> @Deprecated
> @SuppressWarnings
>
Hi, above is not exactly correct in that Java allows annotations to
have attributes.
Some examples:
@KafkaListener(id = "fooGroup3", topics = "topic3")
public void listen2(List<String> in) {
}
@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureTestDatabase
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@ContextConfiguration(classes = {Application.class, TestConfig.class,
MockKafkaConfig.class})
public class TestMe {
}
Etc.
Since @ symbol is not valid in Java programs, its use in annotations
makes them very visible.