Package com.iizix.prop.ui
Class UIAnnotationReferenceProcessor
- java.lang.Object
- com.iizix.prop.ui.UIAnnotationReferenceProcessor
- All Implemented Interfaces:
IAnnotationReferenceProcessor<UIPanelBase,UIComp>
public class UIAnnotationReferenceProcessor extends java.lang.Object implements IAnnotationReferenceProcessor<UIPanelBase,UIComp>
The UI reference processor used for the @UIRef annotation.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description UIAnnotationReferenceProcessor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getReferencePath(GProp<?> comp)
Returns the relative reference path of a component.java.lang.Class<UIPanelBase>
getScopeClass()
Returns the class for the scope reference.UIComp
resolveReference(GProp<?> scope, java.lang.String relativeReference)
Resolves a reference name to a UI component.
Method Detail
getScopeClass
public java.lang.Class<UIPanelBase> getScopeClass()
Returns the class for the scope reference.- Specified by:
getScopeClass
in interfaceIAnnotationReferenceProcessor<UIPanelBase,UIComp>
- Returns:
- The scope class, or null if not a scoped annotation.
resolveReference
public UIComp resolveReference(GProp<?> scope, java.lang.String relativeReference) throws PropTypeException, NotFoundException
Resolves a reference name to a UI component.- Specified by:
resolveReference
in interfaceIAnnotationReferenceProcessor<UIPanelBase,UIComp>
- Parameters:
scope
- The panel in scope, should be instance of UIPanelBase.relativeReference
- The relative name from the panel.- Returns:
- The component found, never null.
- Throws:
PropTypeException
- If the property is not found or if the property is of wrong type.NotFoundException
- If the component is not found.
getReferencePath
public java.lang.String getReferencePath(GProp<?> comp) throws java.lang.IllegalStateException, PropTypeException
Returns the relative reference path of a component.- Specified by:
getReferencePath
in interfaceIAnnotationReferenceProcessor<UIPanelBase,UIComp>
- Parameters:
comp
- The component.- Returns:
- The path.
- Throws:
java.lang.IllegalStateException
- If the tree is invalid.PropTypeException
- If the property type is invalid.