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_ANNOTATIONstatic ClassImpl[]NO_CLASSstatic CommentImpl[]NO_COMMENTstatic ConstructorImpl[]NO_CONSTRUCTORstatic FieldImpl[]NO_FIELDstatic MethodImpl[]NO_METHODstatic ElementImpl[]NO_NODEstatic JPackage[]NO_PACKAGEstatic ParameterImpl[]NO_PARAMETERstatic JProperty[]NO_PROPERTY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(java.lang.Object o)MSourcePositioncreateSourcePosition()static java.lang.StringdefaultName(int count)booleanequals(java.lang.Object o)java.lang.ObjectgetArtifact()This is not something you want to mess with.JamClassLoadergetClassLoader()ElementContextgetContext()MSourcePositiongetMutableSourcePosition()JElementgetParent()Returns the parent of this abstraction, or null if this annotation represents a root abstraction (i.e.java.lang.StringgetSimpleName()Returns a simple name of this abstraction.JSourcePositiongetSourcePosition()Returns an object describing the source file position of this elements, or null if the position is unknown on not applicable.inthashCode()voidremoveSourcePosition()voidsetArtifact(java.lang.Object artifact)voidsetSimpleName(java.lang.String name)java.lang.StringtoString()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:JElementReturns 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:JElementReturns 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:
getSimpleNamein interfaceJElement
-
getSourcePosition
public JSourcePosition getSourcePosition()
Description copied from interface:JElementReturns an object describing the source file position of this elements, or null if the position is unknown on not applicable.- Specified by:
getSourcePositionin interfaceJElement
-
getArtifact
public java.lang.Object getArtifact()
Description copied from interface:JElementThis 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:
getArtifactin interfaceJElement- Returns:
-
setSimpleName
public void setSimpleName(java.lang.String name)
- Specified by:
setSimpleNamein interfaceMElement
-
createSourcePosition
public MSourcePosition createSourcePosition()
- Specified by:
createSourcePositionin interfaceMElement
-
removeSourcePosition
public void removeSourcePosition()
- Specified by:
removeSourcePositionin interfaceMElement
-
getMutableSourcePosition
public MSourcePosition getMutableSourcePosition()
- Specified by:
getMutableSourcePositionin interfaceMElement
-
setArtifact
public void setArtifact(java.lang.Object artifact)
- Specified by:
setArtifactin interfaceMElement
-
getClassLoader
public JamClassLoader getClassLoader()
- Specified by:
getClassLoaderin interfaceMElement
-
defaultName
public static java.lang.String defaultName(int count)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getContext
public ElementContext getContext()
-
toString
public java.lang.String toString()
Description copied from interface:JElementReturns the same String as getQualifiedName().
-
compareTo
public int compareTo(java.lang.Object o)
- Specified by:
compareToin interfacejava.lang.Comparable
-
-