Class Annotation

    • Method Detail

      • getTypeNameProperty

        public final ChildPropertyDescriptor getTypeNameProperty()
        Returns structural property descriptor for the "typeName" property of this node (child type: Name).
        Returns:
        the property descriptor
      • getTypeName

        public Name getTypeName()
        Returns the annotation type name of this annotation.
        Returns:
        the annotation type name
      • setTypeName

        public void setTypeName​(Name typeName)
        Sets the annotation type name of this annotation.
        Parameters:
        typeName - the annotation type name
        Throws:
        IllegalArgumentException - if:
        • the node belongs to a different AST
        • the node already has a parent
      • isNormalAnnotation

        public boolean isNormalAnnotation()
        Returns whether this is a normal annotation (NormalAnnotation).
        Returns:
        true if this is a normal annotation, and false otherwise
      • isMarkerAnnotation

        public boolean isMarkerAnnotation()
        Returns whether this is a marker annotation (MarkerAnnotation).
        Returns:
        true if this is a marker annotation, and false otherwise
      • isSingleMemberAnnotation

        public boolean isSingleMemberAnnotation()
        Returns whether this is a single member annotation. (SingleMemberAnnotation).
        Returns:
        true if this is a single member annotation, and false otherwise
      • resolveAnnotationBinding

        public IAnnotationBinding resolveAnnotationBinding()
        Resolves and returns the resolved annotation for this annotation.

        Note that bindings (which includes resolved annotations) are generally unavailable unless requested when the AST is being built.

        Returns:
        the resolved annotation, or null if the annotation cannot be resolved
        Since:
        3.2