Annotation Interface VS


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface VS
Tags a POJO as being a VirtualSpace class with event listeners, or, with refOnly = true, as a class that only uses a VirtualSpace.

The constructor of a VirtualSpace class must be public and cannot have any parameters: the server instantiates the class the VirtualSpace's class reference names.

Example:

  @VS(ref="Proj:/vs/subFolder/OneVS" [, refOnly = true])
  public class MyVSListener
    {
    public MyVSListener()
      {
      ...
      }
    }

Author:
Christopher Mindus
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The Full String Reference to the VirtualSpace property.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Option to use the annotation for referencing in the Java code only, together with @VSRef, and be able to use String refactoring.
  • Element Details

    • ref

      String ref
      The Full String Reference to the VirtualSpace property. This property must be of main type, i.e. being a Resource (.iiziVS file).
      Returns:
      The Full String Reference to the Property (includes the Module Project and slashes).
    • refOnly

      boolean refOnly
      Option to use the annotation for referencing in the Java code only, together with @VSRef, and be able to use String refactoring.

      With the default false the class is the VirtualSpace's class: the VirtualSpace's class reference must name it (iiziGo checks both sides), the server instantiates it once per application session and invokes its @OnVS... event methods.

      When refOnly is true, the class only uses the VirtualSpace: its @VSRef strings (fields, variables, casts and the annotated String parameters of the API such as VirtualSpace.getField) are checked against the VirtualSpace and refactored when it changes, the VirtualSpace does not have to have a back reference to the class and keeps its one class, the server never instantiates the class through the VirtualSpace, and an event method annotated in it is never invoked (iiziGo reports such a method). A VirtualSpace cannot name a reference-only class as its class.

      Default:
      false