Do it like this:
public @interface CustomAnnot {
String[] author() default "me";
String description() default "";
}
And your annotation:
@CustomAnnot(author={"author1","author2"}, description="test")
More Related Contents:
- Which @NotNull Java annotation should I use?
- Does Spring @Transactional attribute work on a private method?
- How to supply value to an annotation from a Constant java
- Hibernate Annotations – Which is better, field or property access?
- Why is it not possible to extend annotations in Java?
- @Resource vs @Autowired
- How to inject a Map using the @Value Spring Annotation?
- Why does JPA have a @Transient annotation?
- How to map JSON field names to different object field names?
- hibernate column name issues
- annotation to make a private method public only for test classes [duplicate]
- @Transactional(propagation=Propagation.REQUIRED)
- How do Java method annotations work in conjunction with method overriding?
- How do annotations like @Override work internally in Java?
- Jackson – Required property?
- How to use Hibernate @Any-related annotations?
- How to extend Java annotation?
- Java Getters and Setters
- Spring annotation-based DI vs xml configuration?
- Create Annotation instance with defaults, in Java
- How to use Annotations with iBatis (myBatis) for an IN query?
- Name attribute in @Entity and @Table
- Setting a JPA timestamp column to be generated by the database?
- Spring MVC: difference between and tags? [duplicate]
- Why should anybody put annotations on the getters or setters when using JPA to map the classes?
- In Java why this error: ‘attribute value must be constant’?
- ElementType.LOCAL_VARIABLE annotation type
- Hibernate mapping between PostgreSQL enum and Java enum
- how to make a composite primary key (java persistence annotation)
- How to disable TestNG test based on a condition