Class ElementImpl

    • Method Detail

      • getParent

        public final JElement getParent()
        Description copied from interface: JElement

        Returns the parent of this abstraction, or null if this annotation represents a root abstraction (i.e. a JPackage). The JElement hierarchy looks like this:

             JPackage
               JClass
                 JConstructor
                 JField
                 JMethod
                   JParameter
                 JProperty
                 JClass (inner class)...
         

        Additionally, any of the abstractions above may in turn have child JAnnotations, which may themselves have child JAnnotations.

        Specified by:
        getParent in interface JElement
      • getSimpleName

        public java.lang.String getSimpleName()
        Description copied from interface: JElement

        Returns a simple name of this abstraction. The exact format of the name depends on the particular abstraction (see javadoc). Please refer to the JAM package documentation for more details on naming conventions.

        Specified by:
        getSimpleName in interface JElement
      • getSourcePosition

        public JSourcePosition getSourcePosition()
        Description copied from interface: JElement
        Returns an object describing the source file position of this elements, or null if the position is unknown on not applicable.
        Specified by:
        getSourcePosition in interface JElement
      • getArtifact

        public java.lang.Object getArtifact()
        Description copied from interface: JElement

        This is not something you want to mess with. It's here only for the benefit of some JAM implementations which need a handle back to the actual implementation-specific object which is being proxied by this JElement.

        Specified by:
        getArtifact in interface JElement
        Returns:
      • setSimpleName

        public void setSimpleName​(java.lang.String name)
        Specified by:
        setSimpleName in interface MElement
      • setArtifact

        public void setArtifact​(java.lang.Object artifact)
        Specified by:
        setArtifact in interface MElement
      • defaultName

        public static java.lang.String defaultName​(int count)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Description copied from interface: JElement

        Returns the same String as getQualifiedName().

        Specified by:
        toString in interface JElement
        Overrides:
        toString in class java.lang.Object
      • compareTo

        public int compareTo​(java.lang.Object o)
        Specified by:
        compareTo in interface java.lang.Comparable