org.eclipse.jdt.internal.compiler.lookup
Class MethodBinding

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.lookup.Binding
      extended by org.eclipse.jdt.internal.compiler.lookup.MethodBinding
Direct Known Subclasses:
ParameterizedMethodBinding, ProblemMethodBinding, SyntheticMethodBinding, UpdatedMethodBinding

public class MethodBinding
extends Binding


Field Summary
 ReferenceBinding declaringClass
           
 AbstractMethodDeclaration methodDeclaration
           
 int modifiers
           
 MethodBinding[] overriddenInheritedMethods
           
 TypeBinding[] parameters
           
 TypeBinding returnType
           
 char[] selector
           
 long tagBits
           
 ReferenceBinding[] thrownExceptions
           
 TypeVariableBinding[] typeVariables
           
 
Fields inherited from class org.eclipse.jdt.internal.compiler.lookup.Binding
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_TYPE, LOCAL, METHOD, NO_ANNOTATIONS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_PARAMETERS, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, PACKAGE, PARAMETERIZED_TYPE, RAW_TYPE, TYPE, TYPE_PARAMETER, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, VARIABLE, WILDCARD_TYPE
 
Constructor Summary
MethodBinding(int modifiers, char[] selector, TypeBinding returnType, TypeBinding[] parameters, ReferenceBinding[] thrownExceptions, ReferenceBinding declaringClass)
           
MethodBinding(int modifiers, TypeBinding[] parameters, ReferenceBinding[] thrownExceptions, ReferenceBinding declaringClass)
           
MethodBinding(int modifiers, TypeBinding[] parameters, ReferenceBinding[] thrownExceptions, ReferenceBinding declaringClass, AbstractMethodDeclaration method)
           
MethodBinding(MethodBinding initialMethodBinding, ReferenceBinding declaringClass)
           
 
Method Summary
 boolean areParameterErasuresEqual(MethodBinding method)
           
 boolean areParametersCompatibleWith(TypeBinding[] arguments)
           
 boolean areParametersEqual(MethodBinding method)
           
 boolean areTypeVariableErasuresEqual(MethodBinding method)
           
 boolean canBeSeenBy(InvocationSite invocationSite, Scope scope)
           
 boolean canBeSeenBy(PackageBinding invocationPackage)
           
 boolean canBeSeenBy(TypeBinding receiverType, InvocationSite invocationSite, Scope scope)
           
 java.util.List collectMissingTypes(java.util.List missingTypes)
           
 char[] computeUniqueKey(boolean isLeaf)
           
 TypeBinding constantPoolDeclaringClass()
           
 char[] constantPoolName()
           
 char[] genericSignature()
          
 int getAccessFlags()
           
 AnnotationBinding[] getAnnotations()
           
 long getAnnotationTagBits()
          Compute the tagbits for standard annotations.
 java.lang.Object getDefaultValue()
           
 AnnotationBinding[][] getParameterAnnotations()
           
 TypeVariableBinding getTypeVariable(char[] variableName)
           
 boolean hasSubstitutedParameters()
          Returns true if method got substituted parameter types (see ParameterizedMethodBinding)
 boolean hasSubstitutedReturnType()
           
 boolean isAbstract()
           
 boolean isBridge()
           
 boolean isConstructor()
           
 boolean isDefault()
           
 boolean isDefaultAbstract()
           
 boolean isDeprecated()
           
 boolean isFinal()
           
 boolean isImplementing()
           
 boolean isMain()
           
 boolean isNative()
           
 boolean isOverriding()
           
 boolean isPrivate()
           
 boolean isProtected()
           
 boolean isPublic()
           
 boolean isStatic()
           
 boolean isStrictfp()
           
 boolean isSynchronized()
           
 boolean isSynthetic()
           
 boolean isUsed()
           
 boolean isVarargs()
           
 boolean isViewedAsDeprecated()
           
 int kind()
           
 MethodBinding original()
          Returns the original method (as opposed to parameterized instances)
 char[] readableName()
           
 void setAnnotations(AnnotationBinding[] annotations)
           
 void setAnnotations(AnnotationBinding[] annotations, AnnotationBinding[][] parameterAnnotations, java.lang.Object defaultValue)
           
 void setDefaultValue(java.lang.Object defaultValue)
           
 void setParameterAnnotations(AnnotationBinding[][] parameterAnnotations)
           
 char[] shortReadableName()
           
 char[] signature()
           
 char[] signature(ClassFile classFile)
           
 int sourceEnd()
           
 AbstractMethodDeclaration sourceMethod()
           
 int sourceStart()
           
 MethodBinding tiebreakMethod()
          Returns the method to use during tiebreak (usually the method itself).
 java.lang.String toString()
           
 TypeVariableBinding[] typeVariables()
           
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.Binding
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isValidBinding, problemId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

modifiers

public int modifiers

selector

public char[] selector

returnType

public TypeBinding returnType

parameters

public TypeBinding[] parameters

thrownExceptions

public ReferenceBinding[] thrownExceptions

declaringClass

public ReferenceBinding declaringClass

typeVariables

public TypeVariableBinding[] typeVariables

tagBits

public long tagBits

methodDeclaration

public AbstractMethodDeclaration methodDeclaration

overriddenInheritedMethods

public MethodBinding[] overriddenInheritedMethods
Constructor Detail

MethodBinding

public MethodBinding(int modifiers,
                     char[] selector,
                     TypeBinding returnType,
                     TypeBinding[] parameters,
                     ReferenceBinding[] thrownExceptions,
                     ReferenceBinding declaringClass)

MethodBinding

public MethodBinding(int modifiers,
                     TypeBinding[] parameters,
                     ReferenceBinding[] thrownExceptions,
                     ReferenceBinding declaringClass)

MethodBinding

public MethodBinding(MethodBinding initialMethodBinding,
                     ReferenceBinding declaringClass)

MethodBinding

public MethodBinding(int modifiers,
                     TypeBinding[] parameters,
                     ReferenceBinding[] thrownExceptions,
                     ReferenceBinding declaringClass,
                     AbstractMethodDeclaration method)
Method Detail

areParameterErasuresEqual

public final boolean areParameterErasuresEqual(MethodBinding method)

areParametersCompatibleWith

public final boolean areParametersCompatibleWith(TypeBinding[] arguments)

areParametersEqual

public final boolean areParametersEqual(MethodBinding method)

areTypeVariableErasuresEqual

public final boolean areTypeVariableErasuresEqual(MethodBinding method)

canBeSeenBy

public final boolean canBeSeenBy(InvocationSite invocationSite,
                                 Scope scope)

canBeSeenBy

public final boolean canBeSeenBy(PackageBinding invocationPackage)

canBeSeenBy

public final boolean canBeSeenBy(TypeBinding receiverType,
                                 InvocationSite invocationSite,
                                 Scope scope)

collectMissingTypes

public java.util.List collectMissingTypes(java.util.List missingTypes)

computeUniqueKey

public char[] computeUniqueKey(boolean isLeaf)
Overrides:
computeUniqueKey in class Binding

constantPoolDeclaringClass

public TypeBinding constantPoolDeclaringClass()

constantPoolName

public final char[] constantPoolName()

genericSignature

public char[] genericSignature()
(param1 ... paramN)returnType thrownException1 ... thrownExceptionP T foo(T t) throws X ---> (TT;)TT;LX; void bar(X t) --> (LX;)V void bar(X t) --> (LX;)V


getAccessFlags

public final int getAccessFlags()

getAnnotations

public AnnotationBinding[] getAnnotations()

getAnnotationTagBits

public long getAnnotationTagBits()
Compute the tagbits for standard annotations. For source types, these could require lazily resolving corresponding annotation nodes, in case of forward references.

Overrides:
getAnnotationTagBits in class Binding
See Also:
Binding.getAnnotationTagBits()

getDefaultValue

public java.lang.Object getDefaultValue()
Returns:
the default value for this annotation method or null if there is no default value

getParameterAnnotations

public AnnotationBinding[][] getParameterAnnotations()
Returns:
the annotations for each of the method parameters or null> if there's no parameter or no annotation at all.

getTypeVariable

public TypeVariableBinding getTypeVariable(char[] variableName)

hasSubstitutedParameters

public boolean hasSubstitutedParameters()
Returns true if method got substituted parameter types (see ParameterizedMethodBinding)


hasSubstitutedReturnType

public boolean hasSubstitutedReturnType()

isAbstract

public final boolean isAbstract()

isBridge

public final boolean isBridge()

isConstructor

public final boolean isConstructor()

isDefault

public final boolean isDefault()

isDefaultAbstract

public final boolean isDefaultAbstract()

isDeprecated

public final boolean isDeprecated()

isFinal

public final boolean isFinal()

isImplementing

public final boolean isImplementing()

isMain

public final boolean isMain()

isNative

public final boolean isNative()

isOverriding

public final boolean isOverriding()

isPrivate

public final boolean isPrivate()

isProtected

public final boolean isProtected()

isPublic

public final boolean isPublic()

isStatic

public final boolean isStatic()

isStrictfp

public final boolean isStrictfp()

isSynchronized

public final boolean isSynchronized()

isSynthetic

public final boolean isSynthetic()

isUsed

public final boolean isUsed()

isVarargs

public final boolean isVarargs()

isViewedAsDeprecated

public final boolean isViewedAsDeprecated()

kind

public final int kind()
Specified by:
kind in class Binding

original

public MethodBinding original()
Returns the original method (as opposed to parameterized instances)


readableName

public char[] readableName()
Specified by:
readableName in class Binding

setAnnotations

public void setAnnotations(AnnotationBinding[] annotations)

setAnnotations

public void setAnnotations(AnnotationBinding[] annotations,
                           AnnotationBinding[][] parameterAnnotations,
                           java.lang.Object defaultValue)

setDefaultValue

public void setDefaultValue(java.lang.Object defaultValue)

setParameterAnnotations

public void setParameterAnnotations(AnnotationBinding[][] parameterAnnotations)

shortReadableName

public char[] shortReadableName()
Overrides:
shortReadableName in class Binding
See Also:
Binding.shortReadableName()

signature

public final char[] signature()

signature

public final char[] signature(ClassFile classFile)

sourceEnd

public final int sourceEnd()

sourceMethod

public AbstractMethodDeclaration sourceMethod()

sourceStart

public final int sourceStart()

tiebreakMethod

public MethodBinding tiebreakMethod()
Returns the method to use during tiebreak (usually the method itself). For generic method invocations, tiebreak needs to use generic method with erasure substitutes.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

typeVariables

public TypeVariableBinding[] typeVariables()