Package org.fastnate.generator.context
Class AnnotationDefaults
java.lang.Object
org.fastnate.generator.context.AnnotationDefaults
- All Implemented Interfaces:
InvocationHandler
Creates an implementation of an annotation class to access the default values for the single values.
- Author:
- Tobias Liefke
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <A extends Annotation>
ACreates a proxy class that returns the default value from the annotation for every method.static <A extends Annotation>
ACreates a proxy class that returns the default value from the annotation for every method.Finds the default value for the original method.
-
Field Details
-
overrides
-
-
Constructor Details
-
AnnotationDefaults
-
-
Method Details
-
create
Creates a proxy class that returns the default value from the annotation for every method.- Parameters:
annotation- the annotation class- Returns:
- the proxy class containing the default values
-
create
Creates a proxy class that returns the default value from the annotation for every method.- Parameters:
annotation- the annotation classoverrides- the name methods that should return a value different from default- Returns:
- the proxy class containing the default values
-
invoke
Finds the default value for the original method.- Specified by:
invokein interfaceInvocationHandler
-