|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.code.Symbol
com.sun.tools.javac.code.Symbol.TypeSymbol
com.sun.tools.javac.code.Symbol.ClassSymbol
public static class Symbol.ClassSymbol
A class for class symbols
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.tools.javac.code.Symbol |
|---|
Symbol.ClassSymbol, Symbol.Completer, Symbol.CompletionFailure, Symbol.DelegatedSymbol, Symbol.Level, Symbol.MethodSymbol, Symbol.OperatorSymbol, Symbol.PackageSymbol, Symbol.TypeSymbol, Symbol.VarSymbol, Symbol.Visitor<R,P> |
| Field Summary | |
|---|---|
JavaFileObject |
classfile
the classfile from where to load this class this will have extension .class or .java |
Name |
flatname
the fully qualified name of the class after converting to flat representation, i.e. |
Name |
fullname
the fully qualified name of the class, i.e. |
Scope |
members_field
a scope for all class members; variables, methods and inner classes type parameters are not part of this scope |
Pool |
pool
the constant pool of the class |
JavaFileObject |
sourcefile
the sourcefile where the class came from |
| Fields inherited from class com.sun.tools.javac.code.Symbol |
|---|
attributes_field, completer, erasure_field, flags_field, kind, level, name, owner, type |
| Constructor Summary | |
|---|---|
Symbol.ClassSymbol(long flags,
Name name,
Symbol owner)
|
|
Symbol.ClassSymbol(long flags,
Name name,
Type type,
Symbol owner)
|
|
| Method Summary | ||
|---|---|---|
|
accept(ElementVisitor<R,P> v,
P p)
Applies a visitor to this element. |
|
|
accept(Symbol.Visitor<R,P> v,
P p)
|
|
java.lang.String |
className()
|
|
void |
complete()
Complete the elaboration of this symbol's definition. |
|
Type |
erasure(Types types)
The symbol's erased type. |
|
long |
flags()
An accessor method for the flags of this symbol. |
|
Name |
flatName()
The fully qualified name of this symbol after converting to flat representation. |
|
|
getAnnotation(java.lang.Class<A> annoType)
Deprecated. this method should never be used by javac internally. |
|
List<Attribute.Compound> |
getAnnotationMirrors()
An accessor method for the attributes of this symbol. |
|
List<Type> |
getInterfaces()
Returns the interface types directly implemented by this class or extended by this interface. |
|
ElementKind |
getKind()
Returns the kind of this element. |
|
NestingKind |
getNestingKind()
Returns the nesting kind of this type element. |
|
Name |
getQualifiedName()
The fully qualified name of this symbol. |
|
Type |
getSuperclass()
Returns the direct superclass of this type element. |
|
boolean |
isSubClass(Symbol base,
Types types)
Is this symbol a subclass of `base'? Only defined for ClassSymbols. |
|
Scope |
members()
If this is a class or package, its members, otherwise null. |
|
java.lang.String |
toString()
The Java source which this symbol represents. |
|
| Methods inherited from class com.sun.tools.javac.code.Symbol.TypeSymbol |
|---|
formFlatName, formFullName, getBounds, getEnclosedElements, getGenericElement, precedes |
| Methods inherited from class com.sun.tools.javac.code.Symbol |
|---|
addParentLevel, asMemberOf, asType, attribute, clone, enclClass, exists, externalType, getEnclosingElement, getLevel, getModifiers, getSimpleName, getTypeParameters, hasOuterInstance, isConstructor, isEnclosedBy, isInheritedIn, isInner, isInterface, isLocal, isMemberOf, isStatic, location, location, outermostClass, overrides, packge, removeParentLevel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.lang.model.element.TypeElement |
|---|
getTypeParameters |
| Methods inherited from interface javax.lang.model.element.Element |
|---|
asType, equals, getEnclosedElements, getEnclosingElement, getModifiers, getSimpleName, hashCode |
| Field Detail |
|---|
public Scope members_field
public Name fullname
public Name flatname
public JavaFileObject sourcefile
public JavaFileObject classfile
public Pool pool
| Constructor Detail |
|---|
public Symbol.ClassSymbol(long flags,
Name name,
Type type,
Symbol owner)
public Symbol.ClassSymbol(long flags,
Name name,
Symbol owner)
| Method Detail |
|---|
public java.lang.String toString()
toString in class Symbolpublic long flags()
Symbol
flags in class Symbolpublic Scope members()
Symbol
members in class Symbolpublic List<Attribute.Compound> getAnnotationMirrors()
Symbol
getAnnotationMirrors in interface ElementgetAnnotationMirrors in class SymbolElementFilterpublic Type erasure(Types types)
Symbol
erasure in class Symbolpublic java.lang.String className()
public Name getQualifiedName()
Symbol
getQualifiedName in interface TypeElementgetQualifiedName in class SymbolElements.getBinaryName(javax.lang.model.element.TypeElement)public Name flatName()
Symbol
flatName in class Symbol
public boolean isSubClass(Symbol base,
Types types)
Symbol
isSubClass in class Symbol
public void complete()
throws Symbol.CompletionFailure
complete in class SymbolSymbol.CompletionFailurepublic List<Type> getInterfaces()
TypeElement
getInterfaces in interface TypeElementpublic Type getSuperclass()
TypeElementjava.lang.Object, then a NoType
with kind NONE is returned.
getSuperclass in interface TypeElementNoType if there is nonepublic ElementKind getKind()
Elementkind of this element.
getKind in interface ElementgetKind in class Symbol.TypeSymbolpublic NestingKind getNestingKind()
TypeElement
getNestingKind in interface TypeElement@Deprecated public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annoType)
Elementnull. The
annotation may be either inherited or directly present on this
element.
The annotation returned by this method could contain an element
whose value is of type Class.
This value cannot be returned directly: information necessary to
locate and load a class (such as the class loader to use) is
not available, and the class might not be loadable at all.
Attempting to read a Class object by invoking the relevant
method on the returned annotation
will result in a MirroredTypeException,
from which the corresponding TypeMirror may be extracted.
Similarly, attempting to read a Class[]-valued element
will result in a MirroredTypesException.
Note: This method is unlike others in this and related interfaces. It operates on runtime reflective information — representations of annotation types currently loaded into the VM — rather than on the representations defined by and used throughout these interfaces. Consequently, calling methods on the returned annotation object can throw many of the exceptions that can be thrown when calling methods on an annotation object returned by core reflection. This method is intended for callers that are written to operate on a known, fixed set of annotation types.
getAnnotation in interface ElementgetAnnotation in class SymbolA - the annotation typeannoType - the Class object corresponding to
the annotation type
nullElement.getAnnotationMirrors(),
AnnotatedElement.getAnnotation(java.lang.Class) ,
EnumConstantNotPresentException,
AnnotationTypeMismatchException,
IncompleteAnnotationException,
MirroredTypeException,
MirroredTypesException
public <R,P> R accept(ElementVisitor<R,P> v,
P p)
Element
accept in interface Elementaccept in class Symbol.TypeSymbolR - the return type of the visitor's methodsP - the type of the additional parameter to the visitor's methodsv - the visitor operating on this elementp - additional parameter to the visitor
public <R,P> R accept(Symbol.Visitor<R,P> v,
P p)
accept in class Symbol.TypeSymbol
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||