|
|||||||||
| 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.MethodSymbol
public static class Symbol.MethodSymbol
A class for method 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 | |
|---|---|
Code |
code
The code of the method. |
Attribute |
defaultValue
For an attribute field accessor, its default value if any. |
List<Symbol.VarSymbol> |
params
The parameters of the method. |
List<Name> |
savedParameterNames
The names of the parameters |
| 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.MethodSymbol(long flags,
Name name,
Type type,
Symbol owner)
Construct a method symbol, given its flags, name, type and owner. |
|
| Method Summary | ||
|---|---|---|
|
accept(ElementVisitor<R,P> v,
P p)
Applies a visitor to this element. |
|
|
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). |
|
Symbol.MethodSymbol |
binaryImplementation(Symbol.ClassSymbol origin,
Types types)
The implementation of this (abstract) symbol in class origin, from the VM's point of view, null if method does not have an implementation in class. |
|
boolean |
binaryOverrides(Symbol _other,
Symbol.TypeSymbol origin,
Types types)
Will the erasure of this method be considered by the VM to override the erasure of the other when seen from class `origin'? |
|
Symbol.MethodSymbol |
clone(Symbol newOwner)
Clone this symbol with new owner. |
|
Attribute |
getDefaultValue()
Returns the default value if this executable is an annotation type element. |
|
ElementKind |
getKind()
Returns the kind of this element. |
|
List<Symbol.VarSymbol> |
getParameters()
Returns the formal parameters of this executable. |
|
Type |
getReturnType()
Returns the return type of this executable. |
|
List<Type> |
getThrownTypes()
Returns the exceptions and other throwables listed in this method or constructor's throws clause in declaration
order. |
|
Symbol.MethodSymbol |
implementation(Symbol.TypeSymbol origin,
Types types,
boolean checkResult)
The implementation of this (abstract) symbol in class origin; null if none exists. |
|
Symbol |
implemented(Symbol.TypeSymbol c,
Types types)
find a symbol that this (proxy method) symbol implements. |
|
private boolean |
isOverridableIn(Symbol.TypeSymbol origin)
|
|
boolean |
isVarArgs()
Returns true if this method or constructor accepts a variable
number of arguments and returns false otherwise. |
|
boolean |
overrides(Symbol _other,
Symbol.TypeSymbol origin,
Types types,
boolean checkResult)
Does this symbol override `other' symbol, when both are seen as members of class `origin'? It is assumed that _other is a member of origin. |
|
List<Symbol.VarSymbol> |
params()
|
|
java.lang.String |
toString()
The Java source which this symbol represents. |
|
| Methods inherited from class com.sun.tools.javac.code.Symbol |
|---|
addParentLevel, asType, attribute, complete, enclClass, erasure, exists, externalType, flags, flatName, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getLevel, getModifiers, getQualifiedName, getSimpleName, getTypeParameters, hasOuterInstance, isConstructor, isEnclosedBy, isInheritedIn, isInner, isInterface, isLocal, isMemberOf, isStatic, isSubClass, location, location, members, outermostClass, 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.ExecutableElement |
|---|
getTypeParameters |
| Methods inherited from interface javax.lang.model.element.Element |
|---|
asType, equals, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getModifiers, getSimpleName, hashCode |
| Field Detail |
|---|
public Code code
public List<Symbol.VarSymbol> params
public List<Name> savedParameterNames
public Attribute defaultValue
| Constructor Detail |
|---|
public Symbol.MethodSymbol(long flags,
Name name,
Type type,
Symbol owner)
| Method Detail |
|---|
public Symbol.MethodSymbol clone(Symbol newOwner)
clone in class Symbolpublic java.lang.String toString()
toString in class Symbol
public Symbol implemented(Symbol.TypeSymbol c,
Types types)
c - The class whose members are searched for
implementations
public boolean binaryOverrides(Symbol _other,
Symbol.TypeSymbol origin,
Types types)
public Symbol.MethodSymbol binaryImplementation(Symbol.ClassSymbol origin,
Types types)
origin - The class of which the implementation is a member.
public boolean overrides(Symbol _other,
Symbol.TypeSymbol origin,
Types types,
boolean checkResult)
overrides in class Symbolprivate boolean isOverridableIn(Symbol.TypeSymbol origin)
public Symbol.MethodSymbol implementation(Symbol.TypeSymbol origin,
Types types,
boolean checkResult)
public List<Symbol.VarSymbol> params()
public Symbol asMemberOf(Type site,
Types types)
Symbol
asMemberOf in class Symbolpublic ElementKind getKind()
Elementkind of this element.
getKind in interface ElementgetKind in class Symbolpublic Attribute getDefaultValue()
ExecutableElementnull if this method is not an
annotation type element, or if it is an annotation type element
with no default value.
getDefaultValue in interface ExecutableElementnull if nonepublic List<Symbol.VarSymbol> getParameters()
ExecutableElement
getParameters in interface ExecutableElementpublic boolean isVarArgs()
ExecutableElementtrue if this method or constructor accepts a variable
number of arguments and returns false otherwise.
isVarArgs in interface ExecutableElementtrue if this method or constructor accepts a variable
number of arguments and false otherwise
public <R,P> R accept(ElementVisitor<R,P> v,
P p)
Element
accept in interface ElementR - 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 Symbolpublic Type getReturnType()
ExecutableElementNoType with kind VOID
if this executable is not a method, or is a method that does not
return a value.
getReturnType in interface ExecutableElementpublic List<Type> getThrownTypes()
ExecutableElementthrows clause in declaration
order.
getThrownTypes in interface ExecutableElementthrows clause, or an empty list if there are none
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||