Skip to content

Annotation Details

Alessandro Vurro edited this page Apr 28, 2016 · 20 revisions

under construction

Below each annotation described in detail.
JMap structure:

public @interface JMap {
	String value() default Constants.DEFAULT_FIELD_VALUE;
	String[] attributes() default {};
	Class<?>[] classes() default {};
}
  • value represents the target field name
  • attributes allows the definition of more than one target field name
  • classes identifies the classes of the attributes

To know how this annotation works visit the wiki page: basic mapping.

JGlobalMap:

public @interface JGlobalMap {
	String value() default Constants.DEFAULT_FIELD_VALUE;
	Class<?>[] classes() default {};
	String[] attributes() default {};
	String[] excluded() default {};
}

JMapAccessor:

public @interface JMapAccessor {
	String name() default Constants.DEFAULT_FIELD_VALUE;
	String get() default Constants.DEFAULT_ACCESSOR_VALUE;
	String set() default Constants.DEFAULT_ACCESSOR_VALUE;
	Class<?>[] classes() default {};
}

JMapAccessors:

public @interface JMapAccessors {
	JMapAccessor[] value();
}

JMapConversion:

public @interface JMapConversion {

	public static final String ALL = "all";
	public static enum Type {DYNAMIC, STATIC};
	
	String[] from() default {ALL};
	String[] to() default {ALL};
	Type type() default Type.STATIC;
	boolean avoidSet() default false;
}
Clone this wiki locally