com.sun.tools.javac.code
Class Symbol.DelegatedSymbol

java.lang.Object
  extended by com.sun.tools.javac.code.Symbol
      extended by com.sun.tools.javac.code.Symbol.DelegatedSymbol
All Implemented Interfaces:
Element
Direct Known Subclasses:
Pool.Method, Pool.Variable
Enclosing class:
Symbol

public static class Symbol.DelegatedSymbol
extends Symbol


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
protected  Symbol other
           
 
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.DelegatedSymbol(Symbol other)
           
 
Method Summary
<R,P> R
accept(ElementVisitor<R,P> v, P p)
          Applies a visitor to this element.
<R,P> R
accept(Symbol.Visitor<R,P> v, P p)
           
 Symbol asMemberOf(Type site, Types types)
          The (variable or method) symbol seen as a member of given class type`site' (this might change the symbol's type).
 void complete()
          Complete the elaboration of this symbol's definition.
 Symbol.ClassSymbol enclClass()
          The closest enclosing class of this symbol's declaration.
 Type erasure(Types types)
          The symbol's erased type.
 Type externalType(Types types)
          The external type of a symbol.
 Name flatName()
          The fully qualified name of this symbol after converting to flat representation.
 Name getQualifiedName()
          The fully qualified name of this symbol.
 boolean hasOuterInstance()
          An inner class has an outer instance if it is not an interface it has an enclosing instance class which might be referenced from the class.
 boolean isConstructor()
          Is this symbol a constructor?
 boolean isEnclosedBy(Symbol.ClassSymbol clazz)
          Is this symbol the same as or enclosed by the given class?
 boolean isInheritedIn(Symbol clazz, Types types)
          Is this symbol inherited into a given class? PRE: If symbol's owner is a interface, it is already assumed that the interface is a superinterface of given class.
 boolean isInner()
          A class is an inner class if it it has an enclosing instance class.
 boolean isLocal()
          Is this symbol declared (directly or indirectly) local to a method or variable initializer? Also includes fields of inner classes which are in turn local to a method or variable initializer.
 boolean isMemberOf(Symbol.TypeSymbol clazz, Types types)
          Fully check membership: hierarchy, protection, and hiding.
 boolean isSubClass(Symbol base, Types types)
          Is this symbol a subclass of `base'? Only defined for ClassSymbols.
 Symbol location()
          A Java source description of the location of this symbol; used for error reporting.
 Symbol location(Type site, Types types)
           
 Scope members()
          If this is a class or package, its members, otherwise null.
 Symbol.ClassSymbol outermostClass()
          The outermost class which indirectly owns this symbol.
 Symbol.PackageSymbol packge()
          The package which indirectly owns this symbol.
 java.lang.String toString()
          The Java source which this symbol represents.
 
Methods inherited from class com.sun.tools.javac.code.Symbol
addParentLevel, asType, attribute, clone, exists, flags, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getKind, getLevel, getModifiers, getSimpleName, getTypeParameters, isInterface, isStatic, overrides, 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.Element
equals, hashCode
 

Field Detail

other

protected Symbol other
Constructor Detail

Symbol.DelegatedSymbol

public Symbol.DelegatedSymbol(Symbol other)
Method Detail

toString

public java.lang.String toString()
Description copied from class: Symbol
The Java source which this symbol represents. A description of this symbol; overrides Object.

Overrides:
toString in class Symbol

location

public Symbol location()
Description copied from class: Symbol
A Java source description of the location of this symbol; used for error reporting.

Overrides:
location in class Symbol
Returns:
null if the symbol is a package or a toplevel class defined in the default package; otherwise, the owner symbol is returned

location

public Symbol location(Type site,
                       Types types)
Overrides:
location in class Symbol

erasure

public Type erasure(Types types)
Description copied from class: Symbol
The symbol's erased type.

Overrides:
erasure in class Symbol

externalType

public Type externalType(Types types)
Description copied from class: Symbol
The external type of a symbol. This is the symbol's erased type except for constructors of inner classes which get the enclosing instance class added as first argument.

Overrides:
externalType in class Symbol

isLocal

public boolean isLocal()
Description copied from class: Symbol
Is this symbol declared (directly or indirectly) local to a method or variable initializer? Also includes fields of inner classes which are in turn local to a method or variable initializer.

Overrides:
isLocal in class Symbol

isConstructor

public boolean isConstructor()
Description copied from class: Symbol
Is this symbol a constructor?

Overrides:
isConstructor in class Symbol

getQualifiedName

public Name getQualifiedName()
Description copied from class: Symbol
The fully qualified name of this symbol. This is the same as the symbol's name except for class symbols, which are handled separately.

Overrides:
getQualifiedName in class Symbol

flatName

public Name flatName()
Description copied from class: Symbol
The fully qualified name of this symbol after converting to flat representation. This is the same as the symbol's name except for class symbols, which are handled separately.

Overrides:
flatName in class Symbol

members

public Scope members()
Description copied from class: Symbol
If this is a class or package, its members, otherwise null.

Overrides:
members in class Symbol

isInner

public boolean isInner()
Description copied from class: Symbol
A class is an inner class if it it has an enclosing instance class.

Overrides:
isInner in class Symbol

hasOuterInstance

public boolean hasOuterInstance()
Description copied from class: Symbol
An inner class has an outer instance if it is not an interface it has an enclosing instance class which might be referenced from the class. Nested classes can see instance members of their enclosing class. Their constructors carry an additional this$n parameter, inserted implicitly by the compiler.

Overrides:
hasOuterInstance in class Symbol
See Also:
Symbol.isInner()

enclClass

public Symbol.ClassSymbol enclClass()
Description copied from class: Symbol
The closest enclosing class of this symbol's declaration.

Overrides:
enclClass in class Symbol

outermostClass

public Symbol.ClassSymbol outermostClass()
Description copied from class: Symbol
The outermost class which indirectly owns this symbol.

Overrides:
outermostClass in class Symbol

packge

public Symbol.PackageSymbol packge()
Description copied from class: Symbol
The package which indirectly owns this symbol.

Overrides:
packge in class Symbol

isSubClass

public boolean isSubClass(Symbol base,
                          Types types)
Description copied from class: Symbol
Is this symbol a subclass of `base'? Only defined for ClassSymbols.

Overrides:
isSubClass in class Symbol

isMemberOf

public boolean isMemberOf(Symbol.TypeSymbol clazz,
                          Types types)
Description copied from class: Symbol
Fully check membership: hierarchy, protection, and hiding. Does not exclude methods not inherited due to overriding.

Overrides:
isMemberOf in class Symbol

isEnclosedBy

public boolean isEnclosedBy(Symbol.ClassSymbol clazz)
Description copied from class: Symbol
Is this symbol the same as or enclosed by the given class?

Overrides:
isEnclosedBy in class Symbol

isInheritedIn

public boolean isInheritedIn(Symbol clazz,
                             Types types)
Description copied from class: Symbol
Is this symbol inherited into a given class? PRE: If symbol's owner is a interface, it is already assumed that the interface is a superinterface of given class.

Overrides:
isInheritedIn in class Symbol
Parameters:
clazz - The class for which we want to establish membership. This must be a subclass of the member's owner.

asMemberOf

public Symbol asMemberOf(Type site,
                         Types types)
Description copied from class: Symbol
The (variable or method) symbol seen as a member of given class type`site' (this might change the symbol's type). This is used exclusively for producing diagnostics.

Overrides:
asMemberOf in class Symbol

complete

public void complete()
              throws Symbol.CompletionFailure
Description copied from class: Symbol
Complete the elaboration of this symbol's definition.

Overrides:
complete in class Symbol
Throws:
Symbol.CompletionFailure

accept

public <R,P> R accept(ElementVisitor<R,P> v,
                      P p)
Description copied from interface: Element
Applies a visitor to this element.

Type Parameters:
R - the return type of the visitor's methods
P - the type of the additional parameter to the visitor's methods
Parameters:
v - the visitor operating on this element
p - additional parameter to the visitor
Returns:
a visitor-specified result

accept

public <R,P> R accept(Symbol.Visitor<R,P> v,
                      P p)
Overrides:
accept in class Symbol