Annotations present at compile time but absent at runtime

Posted by deamon on Stack Overflow See other posts from Stack Overflow or by deamon
Published on 2010-04-07T14:58:17Z Indexed on 2010/04/07 19:03 UTC
Read the original article Hit count: 233

Filed under:
|
|

It is possible to use Java class files which includes annotations that are not present at runtime?

Example: I want to write a class with the JPA @Embeddable annotation, which would be present at compile time (maven scope: "provided"). But the annoatation definition could be absent at runtime, if the class is used outside a JPA application.

© Stack Overflow or respective owner

Related posts about java

Related posts about annotations