org.apache.beehive.controls.api.bean
Interface AnnotationMemberTypes


public interface AnnotationMemberTypes

AnnotationMemberTypes defines a set of annotations meant to used on annotation members to specify additional syntatic and semantic behaviour or constraints.

J2SE 5 annotation members provide a very weak level of syntactic and semantic enforcement. Annotation members may only be a certain type (mostly primitives, arrays, plus java.lang.String and a few other classes); it is often useful to be more specific than those types permit.

Consider the following example:

 public @interface LastChanged
 {
     @AnnotationMemberTypes.Date()
     public String date();
 }
 

The use of @AnnotationMemberTypes.Date means that the value of the date string must be a date in some standard form.

AnnotationMemberTypes defines a set of annotations and their semantics, but actual enforcement of those semantics is implementation dependent. An apt-based reference implementation is provided by AnnotationConstraintValidator.

See Also:
AnnotationConstraintValidator

Nested Class Summary
static interface AnnotationMemberTypes.Date
          Member is a Date in the format specified (default is YYYY/MM/DD) Only valid on a member that returns String
static interface AnnotationMemberTypes.Decimal
          Member is a Decimal Value.
static interface AnnotationMemberTypes.FilePath
          Member is a File Path Compiler MUST validate that value points to a readable file.
static interface AnnotationMemberTypes.Int
          Member is an Integer value.
static interface AnnotationMemberTypes.JndiName
          Member is a JNDI name.
static interface AnnotationMemberTypes.Optional
          Marks a member as optional.
static interface AnnotationMemberTypes.QName
          Member is a QName Only valid on a member that returns String
static interface AnnotationMemberTypes.Text
          Member must be a String value.
static interface AnnotationMemberTypes.URI
          Member is a URI Only valid on a member that returns String
static interface AnnotationMemberTypes.URL
          Member is a URL Only valid on a member that returns String
static interface AnnotationMemberTypes.URN
          Member is a URN Only valid on a member that returns String
static interface AnnotationMemberTypes.XML
          Member contains well formed XML Only valid on a member that returns String
 
Field Summary
static byte OPTIONAL_BYTE
           
static char OPTIONAL_CHAR
           
static double OPTIONAL_DOUBLE
           
static float OPTIONAL_FLOAT
           
static int OPTIONAL_INT
           
static long OPTIONAL_LONG
           
static short OPTIONAL_SHORT
           
static String OPTIONAL_STRING
           
static int UNLIMITED_PLACES
           
 

Field Detail

OPTIONAL_STRING

static final String OPTIONAL_STRING
See Also:
Constant Field Values

OPTIONAL_DOUBLE

static final double OPTIONAL_DOUBLE
See Also:
Constant Field Values

OPTIONAL_FLOAT

static final float OPTIONAL_FLOAT
See Also:
Constant Field Values

OPTIONAL_INT

static final int OPTIONAL_INT
See Also:
Constant Field Values

OPTIONAL_LONG

static final long OPTIONAL_LONG
See Also:
Constant Field Values

OPTIONAL_SHORT

static final short OPTIONAL_SHORT
See Also:
Constant Field Values

OPTIONAL_CHAR

static final char OPTIONAL_CHAR
See Also:
Constant Field Values

OPTIONAL_BYTE

static final byte OPTIONAL_BYTE
See Also:
Constant Field Values

UNLIMITED_PLACES

static final int UNLIMITED_PLACES
See Also:
Constant Field Values