Annotation for creating an object namer'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.
Please see the extended description for a detailed description of how this design pattern is used.
- See Also:
-
Nested Class Summary
Nested Classes -
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionThe name of the helper class.The name of the named-object class.The name of the helper class used by the named-object class. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe path for a resource that will contain aproperties
file in XML format, where the value for each key is a script and the key denotes a scripting language.The path for a resource that will contain aproperties
file in XML format, where the value for each key is a script and the key denotes a scripting language.The helper class' superclass.Types for constructors' arguments.Type parameters for the helper's superclass.
-
Element Details
-
helperClass
String helperClassThe name of the helper class. The Object Namer class must extend this class.- Returns:
- the helper class name
-
objectHelperClass
String objectHelperClassThe name of the helper class used by the named-object class.- Returns:
- the class name
-
objectClass
String objectClassThe name of the named-object class.- Returns:
- the class name
-
-
-
helperSuperclass
String helperSuperclassThe helper class' superclass. This is the class the helper extends, and is an optional argument. If missing, the helper class has no "extends" clause.- Returns:
- the name of the helper super class
- Default:
- ""
-
helperSuperclassTypeParms
String helperSuperclassTypeParmsType parameters for the helper's 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's superclass
- Default:
- ""
-
helperSuperclassConstrTypes
ObjectNamer.ConstrTypes[] helperSuperclassConstrTypesTypes for constructors' arguments. Each element in the array is a ConstrTypes annotation that gives the types of one of the helper's superclass' constructors. The helper will have a corresponding number of constructors, with the same arguments. The default provides a constructor with zero arguments, and such a constructor, if desired, should be provided if this argument is used.- Returns:
- an array of annotations contaiing ConstrTypes annotations
- Default:
- {@org.bzdev.obnaming.annotations.ObjectNamer.ConstrTypes}
-
factoryConfigScriptResource
String factoryConfigScriptResourceThe path for a resource that will contain aproperties
file in XML format, where the value for each key is a script and the key denotes a scripting language. When present, and when the helper created is a subclass of org.bzdev.scripting.ScriptingContext, The object namer will be able to use a script to configure a factory based on data provided in the scripting language. The script must accept two arguments: the factory to be configured and data in a format determined by the script to specify the configuration. This element is ignored if scripting is not used.- Returns:
- the path for the specified resource
- See Also:
- Default:
- "/org/bzdev/obnaming/FactoryConfigScript.xml"
-
factoryCreateScriptResource
String factoryCreateScriptResourceThe path for a resource that will contain aproperties
file in XML format, where the value for each key is a script and the key denotes a scripting language. When present, and when the helper created is a subclass of org.bzdev.scripting.ScriptingContext, The object namer will be able to use a script to create factories based on data provided in the scripting language. The script must accept three arguments: the object namer, the name of the package containing the factories, and an object with properties whose names are the names of the variables to be created and whose values are the name of the factory's class (excluding its package). This element is ignored if scripting is not used.- Returns:
- the path for the specified resource
- See Also:
- Default:
- "/org/bzdev/obnaming/FactoryCreateScript.xml"
-