Package com.iizix.api.vs
Annotation Type OnVSFieldStatic
@Documented @Retention(RUNTIME) @Target(METHOD) @Repeatable(OnVSFieldsStatic.class) public @interface OnVSFieldStatic
Annotation for tagging methods to receive VirtualSpace Field events, i.e. for Virtual Field Processors.Only 1 acceptable method pattern for this annotation.
Note:methodName
can be any name you want to use.public static void methodName(
VSFieldEvent
event)
Example:
@VirtualSpace(ref="Proj:/vs/subFolder/OneVS") public class MyVSListener { public MyVSListener() { ... } // Method called to validate the "FieldName" field. @OnVSFieldValidateStatic(ref="Proj:/vs/path", descr="Validates a Field Name", ops={VSFieldEvent.Op.VALIDATE}) public static void onMyStaticValidate(VSFieldEvent event) throws ValueConversionException { ... } // Method called to convert the all possible fields ("*") values to other formats. @OnVSFieldStatic(ref="*", descr="Converts a Field Value", ops={Op.CONVERT_TO_NATIVE}, source={String.class}, target={Boolean.class}) public static void onMyStaticConvert(VSFieldEvent event) throws ValueConversionException { ... } }
- Author:
- Christopher Mindus
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
descr
The description of the validator routine, used in the Eclipse UI.VSFieldEvent.Op[]
ops
The list of supported event operations in this instance.java.lang.String
ref
The Full String Reference to the Property.
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<?>[]
source
The list of supported Value conversion classes that are handled as source conversion from a value, used in the CONVERT_* operations.java.lang.Class<?>[]
target
The list of supported Value conversion classes that are handled as target conversion from a value, used in the CONVERT_* operations.
ops
VSFieldEvent.Op[] ops
The list of supported event operations in this instance. Only the event for the supported operations are fired to the annotation implementing method.- Returns:
- The list of supported events, e.g. VALIDATE and/or CONVERT.
source
java.lang.Class<?>[] source
The list of supported Value conversion classes that are handled as source conversion from a value, used in the CONVERT_* operations.- Returns:
- One or more supported native conversion classes from:
- String.class,
- java.math.BigDecimal.class,
- Boolean.class,
- Byte.class,
- Short.class,
- Integer.class,
- Long.class,
- Float.class,
- Double.class,
- byte[].class (Binary value type),
- java.sql.Date.class,
- java.sql.Time.class,
- java.sql.Timestamp.class,
- Number.class (meaning BigDecimal, Byte, Short, Integer, Long, Float and Double at once).
- Default:
- {}
target
java.lang.Class<?>[] target
The list of supported Value conversion classes that are handled as target conversion from a value, used in the CONVERT_* operations.- Returns:
- One or more supported native value classes of the list below:
- String.class,
- java.math.BigDecimal.class,
- Boolean.class,
- Byte.class,
- Short.class,
- Integer.class,
- Long.class,
- Float.class,
- Double.class,
- byte[].class (Binary value type),
- java.sql.Date.class,
- java.sql.Time.class,
- java.sql.Timestamp.class,
- Number.class (meaning BigDecimal, Byte, Short, Integer, Long, Float and Double at once).
- Default:
- {}