Package com.iizix.prop
Interface IClassReferenceOwner
- All Known Subinterfaces:
IEUIPanel
,IJavaClassLinkEnabler
,IUIClassReferenceOwner
,IVSClassReferenceOwner
- All Known Implementing Classes:
EditorVirtualSpace
,EMLGroup
,EMUISimpleDialog
,EUIContextMenu
,EUIDialog
,EUIPanel
,EUIPanelPart
,EUIPanelPartCnr
,MLGroup
,MUISimpleDialog
,UIContextMenu
,UIDialog
,UIPanel
,UIPanelBase
,UIPanelPart
,UIPanelPartCnr
,VirtualSpace
public interface IClassReferenceOwner
Interface implemented by a property container that holds a ClassReference instance, used to resolve references for MethodReferences, e.g. the VirtualSpace or Panels.
- Author:
- Christopher Mindus
Field Summary
Modifier and TypeFieldDescriptionstatic final Object
Objects used to determine if the class reference instance is retrieved or not.Method Summary
Modifier and TypeMethodDescriptiondefault ClassReference
Gets the ClassReference in the property container from the ClassReference instance.getClassReference
(String id, boolean doCreateIfNotPresent) Gets or creates the ClassReference in the property container.Gets the ClassReference atom name.Returns the required Interface.Returns the required annotation, or null for none.default Object
Gets the ClassReference runtime instance object.<GP extends IGProp<?>>
GPGets the property with theatom
name and checking the class instance of the property.default <T> T
getRuntimeClassInstance
(Class<T> clazz) Gets the class runtime instance that is connected to the object using the default class reference ID (if many exist).default <T> T
getRuntimeClassInstance
(String id, Class<T> clazz) Gets the class runtime instance that is connected to the object using the default class reference ID (if many exist).boolean
Checks if the ClassReference require an annotation back-reference.
Field Details
RETRIEVE_CLASS_REFERENCE_INSTANCE
Objects used to determine if the class reference instance is retrieved or not. The if the class reference instance is equal to this value, then the cached value has not yet been retrieved.
Method Details
getProp
Gets the property with theatom
name and checking the class instance of the property. An error message is logged if the class is not matching.- Type Parameters:
GP
- The property class requested.- Parameters:
atom
- the atom of the property to locate in this property container.clazz
- the class the property must be or extend, null for no checking.- Returns:
- GProp the property or
null
for uninitialized container or the property with specified name is not found, or the class type is not an instance of the specified class.
getClassReference
Gets the ClassReference in the property container from the ClassReference instance.- Returns:
- The resolved class reference instance, null if not resolved or found.
getClassReferenceRuntimeInstance
Gets the ClassReference runtime instance object.- Returns:
- The class runtime instance if there is a
ClassReference
present, defaults to callingClassReference.getRuntimeInstance()
.
getClassReferenceAtom
Gets the ClassReference atom name.- Parameters:
id
- ID for the class reference if several exist,null
for default.- Returns:
- The class reference atom name for the ID.
getClassReference
Gets or creates the ClassReference in the property container.- Parameters:
id
- ID for the class reference if several exist, null for default.doCreateIfNotPresent
- Flag to create the property (this flag can only be true in Designer)!- Returns:
- The resolved class reference instance, null if the ClassReference doesn't exist if the create flag is false. If flag is true, an orphan unresolved EditorClassReference instance (ONLY for the Designer).
isClassReferenceAnnotationBackReferenceRequired
Checks if the ClassReference require an annotation back-reference.- Parameters:
id
- ID for the class reference if several exist, null for default.- Returns:
- true if the annotation is required to have a back-reference on the "ref" member value pair to the ClassReference owner.
getClassReferenceImplementsInterface
Returns the required Interface.- Parameters:
id
- ID for the class reference if several exist, null for default.- Returns:
- The fully qualified name of the interface for the class, or null for none.
getClassReferenceRequiredAnnotation
Returns the required annotation, or null for none.- Parameters:
id
- ID for the class reference if several exist, null for default.- Returns:
- The fully qualified name of the interface for the class, or null for none.
getRuntimeClassInstance
Gets the class runtime instance that is connected to the object using the default class reference ID (if many exist). This is typically used from a panel to access the class that is connected to a VirtualSpace.- Parameters:
clazz
- The requested class type.- Returns:
- The class instance, or null if none is set.
- Throws:
ClassCastException
- If the object is not null and is not assignable to the typeT
.
getRuntimeClassInstance
Gets the class runtime instance that is connected to the object using the default class reference ID (if many exist). This is typically used from a panel to access the class that is connected to a VirtualSpace.- Parameters:
id
- ID for the class reference if several exist, null for default.clazz
- The requested class type.- Returns:
- The class instance, or null if none is set.
- Throws:
ClassCastException
- If the object is not null and is not assignable to the typeT
.