Package com.iizix.api.vs
Annotation Interface 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
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass<?>[]
The list of supported Value conversion classes that are handled as source conversion from a value, used in the CONVERT_* operations.Class<?>[]
The list of supported Value conversion classes that are handled as target conversion from a value, used in the CONVERT_* operations.
Element Details
ref
String refThe Full String Reference to the Property. This reference may be set to "*" to define all potential references, and thus not specifying a back-reference at all.- Returns:
- The Full String Reference to the Property (includes the Module Project and slashes), or "*".
descr
String descrThe description of the validator routine, used in the Eclipse UI.- Returns:
- A descriptive string of the validator.
ops
VSFieldEvent.Op[] opsThe 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
Class<?>[] sourceThe 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
Class<?>[] targetThe 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:
- {}