Class GAnnotation
- java.lang.Object
- com.iizigo.java.parser.annotation.GAnnotation
- All Implemented Interfaces:
IPropReference
,java.lang.Cloneable
public class GAnnotation extends java.lang.Object implements java.lang.Cloneable, IPropReference
This is a data holder class for annotations in resource source files.- Author:
- Mikael Andersson, Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.prop.IPropReference
IPropReference.ReferenceChangeEvent
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnnotationType
getFQNType(java.lang.String fqnClass)
Gets a Type from a fully qualified annotation class (includes package name).java.lang.String
getReferenceDescription()
Gets a short description of this reference, e.g.static AnnotationType
getSimpleNamedType(java.lang.String s)
Gets a Type from a String such as "PropRef" or "VSAction", i.e.boolean
isReferenceValid(GProp<?> property)
Validates the property reference that has been looked up.void
onReferenceEvent(PropReference reference, IPropReference.ReferenceChangeEvent event, GEvent triggerEvent)
Reference event.
Method Detail
getSimpleNamedType
public static AnnotationType getSimpleNamedType(java.lang.String s)
Gets a Type from a String such as "PropRef" or "VSAction", i.e. without the qualifiers in the package name. If this doesn't match, the fully qualified name is tried.- Parameters:
s
- The string.- Returns:
- The Type or null if none matches.
getFQNType
public static AnnotationType getFQNType(java.lang.String fqnClass)
Gets a Type from a fully qualified annotation class (includes package name).- Returns:
- The Type or null if none matches.
getReferenceDescription
public java.lang.String getReferenceDescription()
Gets a short description of this reference, e.g. "VirtualSpace" or "Label For".- Specified by:
getReferenceDescription
in interfaceIPropReference
- Returns:
- The reference description string.
onReferenceEvent
public void onReferenceEvent(PropReference reference, IPropReference.ReferenceChangeEvent event, GEvent triggerEvent)
Reference event.- Specified by:
onReferenceEvent
in interfaceIPropReference
- Parameters:
reference
- The property reference object.event
- The event.triggerEvent
- The event that triggered this reference event, null for none.
isReferenceValid
public boolean isReferenceValid(GProp<?> property)
Validates the property reference that has been looked up.- Specified by:
isReferenceValid
in interfaceIPropReference
- Parameters:
property
- The property to validate.- Returns:
- true, always.