Top "Annotations" questions

In programming, annotations are used to add information to a code element which cannot be expressed by the type system.

What is purpose of @ConditionalOnProperty annotation?

I just modified spring boot configuration, and encountered @ConditionalOnProperty(prefix = "spring.social.", value = "auto-connection-views") from org.springframework.boot.autoconfigure.social.…

spring annotations spring-boot
Is there something like Annotation Inheritance in java?

I'm exploring annotations and came to a point where some annotations seems to have a hierarchy among them. I'm using …

java inheritance annotations
Using Hibernate UUIDGenerator via annotations

I'm using my uuid as following: @Id @GeneratedValue(generator = "uuid") @GenericGenerator(name = "uuid", strategy = "uuid") @Column(name = "uuid", unique = true) …

java hibernate annotations uuid
What does @Override mean?

public class NaiveAlien extends Alien { @Override public void harvest(){} } I was trying to understand my friend's code, and I do …

java annotations overriding
Why is it not possible to extend annotations in Java?

I don't understand why there is no inheritance in Java annotations, just as Java classes. I think it would be …

java inheritance annotations
How to parameterize @Scheduled(fixedDelay) with Spring 3.0 expression language?

When using the Spring 3.0 capability to annotate a scheduled task, I would like to set the fixedDelay as parameter from …

java spring configuration annotations scheduling
Which types can be used for Java annotation members?

Today I wanted to create my first annotation interface following this documentation and I got this compiler error Invalid type …

java annotations
BeanNotOfRequiredTypeException due to autowired fields

I'm still new to Spring MVC and while building my test project, I got this message from Tomcat logs: SEVERE: …

java spring-mvc annotations tomcat7
Which annotation should I use: @IdClass or @EmbeddedId

The JPA (Java Persistence API) specification has 2 different ways to specify entity composite keys: @IdClass and @EmbeddedId. I'm using both …

java jpa annotations java-persistence-api
Unnecessary @SuppressWarnings("unused")

I'm getting a compiler warning for the @SuppressWarnings annotation in eclipse for the code: @Override public boolean doSomething(@SuppressWarnings("unused") …

java eclipse annotations compiler-warnings suppress-warnings