Package com.iizix.prop.ui
Class UIPanelAnnotationReferenceProcessor
- java.lang.Object
- com.iizix.prop.ui.UIPanelAnnotationReferenceProcessor
- All Implemented Interfaces:
IAnnotationReferenceProcessor<UIPanelBase,UIPanelBase>
public class UIPanelAnnotationReferenceProcessor extends java.lang.Object implements IAnnotationReferenceProcessor<UIPanelBase,UIPanelBase>
The UI panel reference processor used for the @UIPanelRef annotation.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description UIPanelAnnotationReferenceProcessor()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getReferencePath(GProp<?> comp)
Returns the reference path of a component.java.lang.Class<UIPanelBase>
getScopeClass()
Returns the class for the scope reference.UIPanelBase
resolveReference(GProp<?> scope, java.lang.String reference)
Resolves a reference name to the UI panel.
Method Detail
getScopeClass
public java.lang.Class<UIPanelBase> getScopeClass()
Returns the class for the scope reference.- Specified by:
getScopeClass
in interfaceIAnnotationReferenceProcessor<UIPanelBase,UIPanelBase>
- Returns:
- null for none.
resolveReference
public UIPanelBase resolveReference(GProp<?> scope, java.lang.String reference) throws PropTypeException, NotFoundException
Resolves a reference name to the UI panel.- Specified by:
resolveReference
in interfaceIAnnotationReferenceProcessor<UIPanelBase,UIPanelBase>
- Parameters:
scope
- The scope, in this case any property of the Module Project.reference
- The reference to the UI panel.- Returns:
- The panel 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 reference path of a component.- Specified by:
getReferencePath
in interfaceIAnnotationReferenceProcessor<UIPanelBase,UIPanelBase>
- Parameters:
comp
- The component.- Returns:
- The reference path to the UI panel.
- Throws:
java.lang.IllegalStateException
- If the tree is invalid.PropTypeException
- If the property type is invalid, i.e. not a panel.