Class GAnnotation

java.lang.Object
com.iizigo.java.parser.annotation.GAnnotation
All Implemented Interfaces:
IPropReference, Cloneable

public class GAnnotation extends Object implements Cloneable, IPropReference
This is a data holder class for annotations in resource source files.
Author:
Mikael Andersson, Christopher Mindus
  • Method Details

    • getSimpleNamedType

      public static AnnotationType getSimpleNamedType(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(String fqnClass)
      Gets a Type from a fully qualified annotation class (includes package name).
      Returns:
      The Type or null if none matches.
    • getReferenceType

      public IPropReference.IRefType getReferenceType()
      Gets the reference Type.
      Specified by:
      getReferenceType in interface IPropReference
      Returns:
      IPropReference.RefType.Annotation.
    • onReferenceEvent

      public void onReferenceEvent(PropReference reference, IPropReference.ReferenceChangeEvent event, GEvent triggerEvent)
      Reference event.
      Specified by:
      onReferenceEvent in interface IPropReference
      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 interface IPropReference
      Parameters:
      property - The property to validate.
      Returns:
      true, always.