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

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.lookup.Binding
      extended by org.eclipse.jdt.internal.compiler.lookup.MethodBinding
          extended by org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding
              extended by org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding
All Implemented Interfaces:
Substitution

public class ParameterizedGenericMethodBinding
extends ParameterizedMethodBinding
implements Substitution

Binding denoting a generic method after type parameter substitutions got performed. On parameterized type bindings, all methods got substituted, regardless whether their signature did involve generics or not, so as to get the proper declaringClass for these methods.


Field Summary
 boolean inferredReturnType
           
 boolean isRaw
           
 boolean isUnchecked
           
 TypeBinding[] typeArguments
           
 boolean wasInferred
           
 
Fields inherited from class org.eclipse.jdt.internal.compiler.lookup.MethodBinding
declaringClass, methodDeclaration, modifiers, overriddenInheritedMethods, parameters, returnType, selector, tagBits, thrownExceptions, 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
ParameterizedGenericMethodBinding(MethodBinding originalMethod, RawTypeBinding rawType, LookupEnvironment environment)
          Create raw generic method for raw type (double substitution from type vars with raw type arguments, and erasure of method variables) Only invoked for non-static generic methods of raw type
ParameterizedGenericMethodBinding(MethodBinding originalMethod, TypeBinding[] typeArguments, LookupEnvironment environment)
          Create method of parameterized type, substituting original parameters with type arguments.
 
Method Summary
static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite)
          Perform inference of generic method type parameters and/or expected type
 char[] computeUniqueKey(boolean isLeaf)
           
 LookupEnvironment environment()
          Returns the lookup environment
 boolean hasSubstitutedParameters()
          Returns true if some parameters got substituted.
 boolean hasSubstitutedReturnType()
          Returns true if the return type got substituted.
 boolean isRawSubstitution()
          Returns true for raw substitution
 TypeBinding substitute(TypeVariableBinding originalVariable)
          Returns the type substitute for a given type variable, or itself if no substitution got performed.
 MethodBinding tiebreakMethod()
          Returns the method to use during tiebreak (usually the method itself).
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding
instantiateGetClass, original
 
Methods inherited from class org.eclipse.jdt.internal.compiler.lookup.MethodBinding
areParameterErasuresEqual, areParametersCompatibleWith, areParametersEqual, areTypeVariableErasuresEqual, canBeSeenBy, canBeSeenBy, canBeSeenBy, collectMissingTypes, constantPoolDeclaringClass, constantPoolName, genericSignature, getAccessFlags, getAnnotations, getAnnotationTagBits, getDefaultValue, getParameterAnnotations, getTypeVariable, isAbstract, isBridge, isConstructor, isDefault, isDefaultAbstract, isDeprecated, isFinal, isImplementing, isMain, isNative, isOverriding, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isSynthetic, isUsed, isVarargs, isViewedAsDeprecated, kind, readableName, setAnnotations, setAnnotations, setDefaultValue, setParameterAnnotations, shortReadableName, signature, signature, sourceEnd, sourceMethod, sourceStart, toString, 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

typeArguments

public TypeBinding[] typeArguments

inferredReturnType

public boolean inferredReturnType

wasInferred

public boolean wasInferred

isRaw

public boolean isRaw

isUnchecked

public boolean isUnchecked
Constructor Detail

ParameterizedGenericMethodBinding

public ParameterizedGenericMethodBinding(MethodBinding originalMethod,
                                         RawTypeBinding rawType,
                                         LookupEnvironment environment)
Create raw generic method for raw type (double substitution from type vars with raw type arguments, and erasure of method variables) Only invoked for non-static generic methods of raw type


ParameterizedGenericMethodBinding

public ParameterizedGenericMethodBinding(MethodBinding originalMethod,
                                         TypeBinding[] typeArguments,
                                         LookupEnvironment environment)
Create method of parameterized type, substituting original parameters with type arguments.

Method Detail

computeCompatibleMethod

public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod,
                                                    TypeBinding[] arguments,
                                                    Scope scope,
                                                    InvocationSite invocationSite)
Perform inference of generic method type parameters and/or expected type


computeUniqueKey

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

environment

public LookupEnvironment environment()
Description copied from interface: Substitution
Returns the lookup environment

Specified by:
environment in interface Substitution
See Also:
Substitution.environment()

hasSubstitutedParameters

public boolean hasSubstitutedParameters()
Returns true if some parameters got substituted. NOTE: generic method invocation delegates to its declaring method (could be a parameterized one)

Overrides:
hasSubstitutedParameters in class ParameterizedMethodBinding

hasSubstitutedReturnType

public boolean hasSubstitutedReturnType()
Returns true if the return type got substituted. NOTE: generic method invocation delegates to its declaring method (could be a parameterized one)

Overrides:
hasSubstitutedReturnType in class ParameterizedMethodBinding

isRawSubstitution

public boolean isRawSubstitution()
Description copied from interface: Substitution
Returns true for raw substitution

Specified by:
isRawSubstitution in interface Substitution
See Also:
Substitution.isRawSubstitution()

substitute

public TypeBinding substitute(TypeVariableBinding originalVariable)
Description copied from interface: Substitution
Returns the type substitute for a given type variable, or itself if no substitution got performed.

Specified by:
substitute in interface Substitution
See Also:
Substitution.substitute(org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding)

tiebreakMethod

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

Overrides:
tiebreakMethod in class MethodBinding
See Also:
MethodBinding.tiebreakMethod()