Class ElementImpl
- java.lang.Object
-
- org.apache.xmlbeans.impl.jam.internal.elements.ElementImpl
-
- Direct Known Subclasses:
AnnotatedElementImpl
,AnnotationImpl
,CommentImpl
public abstract class ElementImpl extends java.lang.Object implements java.lang.Comparable, MElement
Implementation of JElement and MElement.
-
-
Field Summary
Fields Modifier and Type Field Description static AnnotationImpl[]
NO_ANNOTATION
static ClassImpl[]
NO_CLASS
static CommentImpl[]
NO_COMMENT
static ConstructorImpl[]
NO_CONSTRUCTOR
static FieldImpl[]
NO_FIELD
static MethodImpl[]
NO_METHOD
static ElementImpl[]
NO_NODE
static JPackage[]
NO_PACKAGE
static ParameterImpl[]
NO_PARAMETER
static JProperty[]
NO_PROPERTY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(java.lang.Object o)
MSourcePosition
createSourcePosition()
static java.lang.String
defaultName(int count)
boolean
equals(java.lang.Object o)
java.lang.Object
getArtifact()
This is not something you want to mess with.JamClassLoader
getClassLoader()
ElementContext
getContext()
MSourcePosition
getMutableSourcePosition()
JElement
getParent()
Returns the parent of this abstraction, or null if this annotation represents a root abstraction (i.e.java.lang.String
getSimpleName()
Returns a simple name of this abstraction.JSourcePosition
getSourcePosition()
Returns an object describing the source file position of this elements, or null if the position is unknown on not applicable.int
hashCode()
void
removeSourcePosition()
void
setArtifact(java.lang.Object artifact)
void
setSimpleName(java.lang.String name)
java.lang.String
toString()
Returns the same String as getQualifiedName().-
Methods inherited from interface org.apache.xmlbeans.impl.jam.JElement
accept, getQualifiedName
-
-
-
-
Field Detail
-
NO_NODE
public static final ElementImpl[] NO_NODE
-
NO_CLASS
public static final ClassImpl[] NO_CLASS
-
NO_FIELD
public static final FieldImpl[] NO_FIELD
-
NO_CONSTRUCTOR
public static final ConstructorImpl[] NO_CONSTRUCTOR
-
NO_METHOD
public static final MethodImpl[] NO_METHOD
-
NO_PARAMETER
public static final ParameterImpl[] NO_PARAMETER
-
NO_PACKAGE
public static final JPackage[] NO_PACKAGE
-
NO_ANNOTATION
public static final AnnotationImpl[] NO_ANNOTATION
-
NO_COMMENT
public static final CommentImpl[] NO_COMMENT
-
NO_PROPERTY
public static final JProperty[] NO_PROPERTY
-
-
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.
-
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 interfaceJElement
-
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 interfaceJElement
-
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 interfaceJElement
- Returns:
-
setSimpleName
public void setSimpleName(java.lang.String name)
- Specified by:
setSimpleName
in interfaceMElement
-
createSourcePosition
public MSourcePosition createSourcePosition()
- Specified by:
createSourcePosition
in interfaceMElement
-
removeSourcePosition
public void removeSourcePosition()
- Specified by:
removeSourcePosition
in interfaceMElement
-
getMutableSourcePosition
public MSourcePosition getMutableSourcePosition()
- Specified by:
getMutableSourcePosition
in interfaceMElement
-
setArtifact
public void setArtifact(java.lang.Object artifact)
- Specified by:
setArtifact
in interfaceMElement
-
getClassLoader
public JamClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceMElement
-
defaultName
public static java.lang.String defaultName(int count)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getContext
public ElementContext getContext()
-
toString
public java.lang.String toString()
Description copied from interface:JElement
Returns the same String as getQualifiedName().
-
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareTo
in interfacejava.lang.Comparable
-
-