Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gastaldi/annotation-builder
Creates an annotation instance using a fluent configuration
https://github.com/gastaldi/annotation-builder
Last synced: 5 days ago
JSON representation
Creates an annotation instance using a fluent configuration
- Host: GitHub
- URL: https://github.com/gastaldi/annotation-builder
- Owner: gastaldi
- Created: 2011-03-03T15:43:40.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-03-03T16:12:36.000Z (almost 14 years ago)
- Last Synced: 2024-11-08T09:47:35.054Z (about 2 months ago)
- Language: Java
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.txt
Awesome Lists containing this project
README
Suppose you have an annotation like:
public @interface MyAnnotation {
String aStringValue();
boolean aBooleanValue();
}You may use AnnotationBuilder to configure a new instance for it:
AnnotationBuilder builder = AnnotationBuilder.create(MyAnnotation.class);
MyAnnotation mockAnn = builder.toMock(MyAnnotation.class);builder.configure(mockAnn.aStringValue()).with("Some value");
builder.configure(mockAnn.aBooleanValue()).with(true);//This is your instance annotation
MyAnnotation annInstance = builder.toAnnotation();