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 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 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:
      • defaultName

        public static String defaultName​(int count)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object