-
Annotation Types Summary
Annotation Type |
Description |
Builder |
Annotation applied to a method in an abstract class or interface
to indicate that the method is an accessor for a property value.
|
Delegate |
Annotation applied to a method in an abstract class or interface
to indicate that the method is an accessor for a property value.
|
Factory |
Annotation applied to a method in an abstract class or interface
to indicate that the method is an accessor for a property value.
|
Value |
Annotation applied to a method in an abstract class or interface
to indicate that the method is an accessor for a property value.
|
Package org.glassfish.pfl.dynamic.generator Description
This package defines a facility that can be used to enhance Java interfaces
and abstract classes with properties and delegation. Delegation only
applies to abstract classes, since a class must contain non-static
data members to support delegation.
An interface or abstract class that contains at least one abstract method
annotated @Value or at least one field annotated @Delegate is a client
class. The resulting implementation produced automatically as described
below is the enhanced class.
All properties are read-only and all delegates are set in the constructor.
Writable properties are generally a bad idea, and indicate a poor design.
Dynamic delegation is potentially very useful, but not really in keeping
with the static nature of Java interfaces. It also raises complex
synchronization questions which probably cannot be handled by a general
framework.
Annotations used: