Annotation Type NamedObject


@Retention(SOURCE) @Target(TYPE) public @interface NamedObject
Annotation for creating a named object's helper class.

The design pattern used in conjunction with the org.bzdev.obnaming.annotations package to create an object namer class and the corresponding named object class provides implementations of two interfaces, NamedObjectOps and ObjectNamerOps<TO extends NamedObjectOps>, by creating helper classes that are superclasses of a named-object class and a corresponding object-namer class.

The use of this annotation requires a particular design pattern. Please see the extended description for a detailed description.

See Also:
  • Element Details

    • helperClass

      String helperClass
      The named-object class' helper class.
      Returns:
      the helper class
    • namerHelperClass

      String namerHelperClass
      The name of the object-namer class.
      Returns:
      the name of the object-namer class
    • namerClass

      String namerClass
      The namer class. The named object will have a protected method named getObjectNamer() that returns an instance of this class.
      Returns:
      the namer class
    • helperSuperclass

      String helperSuperclass
      The superclass of the named-object helper class. This must be a Java class name.
      Returns:
      the superclass of the helper class
      Default:
      ""
    • helperSuperclassTypeParms

      String helperSuperclassTypeParms
      Type parameters for the helper superclass. These must be actual types, not parameters. The value must include the delimiting '<' and '>' characters and the types must be separated by commas.
      Returns:
      the type parameters for the helper superclass
      Default:
      ""
    • helperSuperclassConstrTypes

      NamedObject.ConstrTypes[] helperSuperclassConstrTypes
      Description of superclass constructors. Each array entry contains a list of the types for a helper's superclass constructor's arguments, in the order in which they appear. An optional member also provides an array of the exceptions that might be thrown. The default provides a constructor with zero arguments, and such a constructor, if desired, should be provided if this argument is used.
      Returns:
      description of superclass constructors
      Default:
      {@org.bzdev.obnaming.annotations.NamedObject.ConstrTypes}