public class TLcdShapeAnnotation extends Object implements ILcdAnnotation
ILcdShape
interfaces are implemented by instances of a data
type.
If an instance class of a data type implements ILcdShape
, this annotation can be set on
the data type to provide information on which actual ILcdShape
interfaces are allowed to
be implemented by subclasses of the data type's instance class.Constructor and Description |
---|
TLcdShapeAnnotation(boolean aShapeMandatory,
Class<? extends ILcdShape>... aShapeClasses)
Creates a new
TLcdShapeAnnotation with the specified list of shape classes. |
TLcdShapeAnnotation(Set<Class<? extends ILcdShape>> aShapeClasses,
boolean aShapeMandatory)
Creates a new
TLcdShapeAnnotation with the specified list of shape classes. |
Modifier and Type | Method and Description |
---|---|
Set<Class<? extends ILcdShape>> |
getShapeClasses()
Returns the set of shape classes that is allowed to be implemented by instances of this
annotation's data type.
|
boolean |
isShapeMandatory()
Returns
true if an instance of this annotation's data type always implements a shape
interface, false if it may be shapeless. |
public TLcdShapeAnnotation(Set<Class<? extends ILcdShape>> aShapeClasses, boolean aShapeMandatory)
TLcdShapeAnnotation
with the specified list of shape classes.aShapeClasses
- the set of shape classes that is allowed to be implemented by
instances of this annotation's data type.aShapeMandatory
- true
if an instance of this annotation's data type always
implements a shape interface, false
if it may be shapeless.public TLcdShapeAnnotation(boolean aShapeMandatory, Class<? extends ILcdShape>... aShapeClasses)
TLcdShapeAnnotation
with the specified list of shape classes.aShapeClasses
- the shape classes that are allowed as shape on the instances of
this annotation's data type.aShapeMandatory
- public Set<Class<? extends ILcdShape>> getShapeClasses()
public boolean isShapeMandatory()
true
if an instance of this annotation's data type always implements a shape
interface, false
if it may be shapeless.true
if an instance of this annotation's data type always implements a shape
interface, false
if it may be shapeless.