Annotation Interface ModelItem


@Retention(RUNTIME) public @interface ModelItem
An annotation describing how this model item is mapped in an S-expression
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    This is the class to use by default when the mapper is looking for a particular type of class
    boolean
    When an enum starts an expression, the expression for that enum may or may not be needed to create the class.
    boolean
    If true, this item should be created to hold a double constant
    boolean
    If true, when this item is matched it is the start of an expression whose type is the parent class of this item (usually used for enum values within a class)
    boolean
    If true, this item should be created to hold an int constant
    boolean
    If true, this item should be created to hold a string constant
    boolean
    If true, this item should be created to hold a symbol
    The s-expression symbol that indicates the start of this item
    int
    If an item constructor has a vararg constructor that should be used, set this to true
  • Element Details

    • symbol

      String symbol
      The s-expression symbol that indicates the start of this item
      Returns:
      The default symbol for this item (empty means none)
      Default:
      ""
    • isIntConstant

      boolean isIntConstant
      If true, this item should be created to hold an int constant
      Returns:
      True if this item should be created to hold an int constant
      Default:
      false
    • isDoubleConstant

      boolean isDoubleConstant
      If true, this item should be created to hold a double constant
      Returns:
      True if this item should be created to hold a double constant
      Default:
      false
    • isStringConstant

      boolean isStringConstant
      If true, this item should be created to hold a string constant
      Returns:
      True if this item should be created to hold a string constant
      Default:
      false
    • isSymbolExpr

      boolean isSymbolExpr
      If true, this item should be created to hold a symbol
      Returns:
      True if this item should be created to hold a symbol
      Default:
      false
    • isExprStart

      boolean isExprStart
      If true, when this item is matched it is the start of an expression whose type is the parent class of this item (usually used for enum values within a class)
      Returns:
      True if this item is the start of the expression for its parent class
      Default:
      false
    • defaultForClass

      Class defaultForClass
      This is the class to use by default when the mapper is looking for a particular type of class
      Returns:
      The class that this item is the default for
      Default:
      java.lang.Object.class
    • includeStartSymbol

      boolean includeStartSymbol
      When an enum starts an expression, the expression for that enum may or may not be needed to create the class. This indicates whether to include it.
      Returns:
      True if the first symbol matched for this item should be included
      Default:
      false
    • varargStart

      int varargStart
      If an item constructor has a vararg constructor that should be used, set this to true
      Returns:
      True if the item has a vararg constructor
      Default:
      -1