Class ParameterizedGenericMethodBinding
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding
- All Implemented Interfaces:
Substitution
- Direct Known Subclasses:
PolyParameterizedGenericMethodBinding
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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Substitution
Substitution.NullSubstitution
-
Field Summary
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding
originalMethod
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding
declaringClass, defaultNullness, extendedTagBits, modifiers, PARAM_NONNULL, PARAM_NOTOWNING, PARAM_NULLABLE, PARAM_NULLITY, PARAM_OWNING, parameterFlowBits, parameterNames, parameters, receiver, returnType, selector, tagBits, thrownExceptions, typeAnnotations, typeVariables
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
ANY_EXCEPTION, ARRAY_TYPE, BASE_TYPE, DefaultLocationArrayContents, DefaultLocationField, DefaultLocationParameter, DefaultLocationReturnType, DefaultLocationsForTrueValue, DefaultLocationTypeArgument, DefaultLocationTypeBound, DefaultLocationTypeParameter, FIELD, GENERIC_TYPE, IMPORT, INTERSECTION_TYPE, INTERSECTION_TYPE18, LOCAL, METHOD, MODULE, NO_ANNOTATIONS, NO_COMPONENTS, NO_ELEMENT_VALUE_PAIRS, NO_EXCEPTIONS, NO_FIELDS, NO_MEMBER_TYPES, NO_METHODS, NO_MODULES, NO_NULL_DEFAULT, NO_PACKAGES, NO_PARAMETER_NAMES, NO_PARAMETERS, NO_PERMITTEDTYPES, NO_PLAIN_PACKAGES, NO_REFERENCE_TYPES, NO_SUPERINTERFACES, NO_TYPE_VARIABLES, NO_TYPES, NULL_UNSPECIFIED_BY_DEFAULT, NullnessDefaultMASK, PACKAGE, PARAMETERIZED_TYPE, PATTERN, POLY_TYPE, RAW_TYPE, RECORD_COMPONENT, TYPE, TYPE_PARAMETER, TYPE_USE, UNINITIALIZED_COMPONENTS, UNINITIALIZED_FIELDS, UNINITIALIZED_METHODS, UNINITIALIZED_REFERENCE_TYPES, VARIABLE, WILDCARD_TYPE
-
Constructor Summary
ConstructorDescriptionParameterizedGenericMethodBinding
(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 typeParameterizedGenericMethodBinding
(MethodBinding originalMethod, TypeBinding[] typeArguments, LookupEnvironment environment, boolean inferredWithUncheckConversion, boolean hasReturnProblem, TypeBinding targetType) Create method of parameterized type, substituting original parameters with type arguments. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Subtypes can override this to return true if an access method should be used when referring to this method binding.static MethodBinding
computeCompatibleMethod
(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) Perform inference of generic method type parameters and/or expected typestatic MethodBinding
computeCompatibleMethod18
(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) char[]
computeUniqueKey
(boolean isLeaf) Returns the lookup environmentgetAccessMethod
(boolean staticReference) This will only be called if alwaysNeedsAccessMethod() returns true.boolean
Returns true if some parameters got substituted.boolean
Returns true if the return type got substituted.boolean
boolean
Returns true for raw substitutionsubstitute
(TypeVariableBinding originalVariable) Returns the type substitute for a given type variable, or itself if no substitution got performed.Returns the method to use during tiebreak (usually the method itself).Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterizedMethodBinding
canBeSeenBy, instantiateGetClass, original, shallowOriginal, sourceMethod
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding
areParameterErasuresEqual, areParametersCompatibleWith, areParametersEqual, areTypeVariableErasuresEqual, asRawMethod, canBeSeenBy, canBeSeenBy, collectMissingTypes, computeSignature, computeSubstitutedMethod, constantPoolName, doesParameterLengthMatch, fillInDefaultNonNullness, fillInDefaultNonNullness18, findOriginalInheritedMethod, findPrivilegedBinding, flowBitFromAnnotationTagBit, genericSignature, getAccessFlags, getAllTypeVariables, getAnnotations, getAnnotationTagBits, getDefaultValue, getParameterAnnotations, getParameterNullness, getTypeAnnotations, getTypeVariable, getVisibleBinding, getVisibleBinding, hasNonNullDefaultForParameter, hasNonNullDefaultForReturnType, hasPolymorphicSignature, isAbstract, isBridge, isCanonicalConstructor, isClosingMethod, isCompactConstructor, isConstructor, isDefault, isDefaultAbstract, isDefaultMethod, isDeprecated, isFinal, isImplementing, isImplicit, isMain, isNative, isOrEnclosedByPrivateType, isOverriding, isPolymorphic, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isSynthetic, isUsed, isVarargs, isViewedAsDeprecated, isVoidMethod, isWellknownMethod, isWellknownMethod, kind, notownsParameter, ownsParameter, readableName, redeclaresPublicObjectMethod, setAnnotations, setAnnotations, setDefaultValue, setParameterAnnotations, setSelector, setTypeAnnotations, shortReadableName, signature, signature, sourceEnd, sourceLambda, sourceRecordComponent, sourceStart, toString, typeVariables, updateTypeVariableBinding, verifyOverrideCompatibility
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isAnnotationType, isParameter, isPatternVariable, isTaggedRepeatable, isValid, isValidBinding, isVolatile, problemId, setAnnotations
-
Field Details
-
typeArguments
-
environment
-
inferredReturnType
public boolean inferredReturnType -
wasInferred
public boolean wasInferred -
isRaw
public boolean isRaw -
inferredWithUncheckedConversion
public boolean inferredWithUncheckedConversion -
targetType
-
-
Constructor Details
-
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, boolean inferredWithUncheckConversion, boolean hasReturnProblem, TypeBinding targetType) Create method of parameterized type, substituting original parameters with type arguments.
-
-
Method Details
-
computeCompatibleMethod
public static MethodBinding computeCompatibleMethod(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) Perform inference of generic method type parameters and/or expected typeIn 1.8+ if the expected type is not yet available due to this call being an argument to an outer call which is not overload-resolved yet, the returned method binding will be a PolyParameterizedGenericMethodBinding.
-
computeCompatibleMethod18
public static MethodBinding computeCompatibleMethod18(MethodBinding originalMethod, TypeBinding[] arguments, Scope scope, InvocationSite invocationSite) -
computeUniqueKey
public char[] computeUniqueKey(boolean isLeaf) - Overrides:
computeUniqueKey
in classMethodBinding
-
environment
Description copied from interface:Substitution
Returns the lookup environment- Specified by:
environment
in interfaceSubstitution
- See Also:
-
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 classParameterizedMethodBinding
-
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 classParameterizedMethodBinding
-
isParameterizedGeneric
public boolean isParameterizedGeneric()- Overrides:
isParameterizedGeneric
in classMethodBinding
-
isRawSubstitution
public boolean isRawSubstitution()Description copied from interface:Substitution
Returns true for raw substitution- Specified by:
isRawSubstitution
in interfaceSubstitution
- See Also:
-
substitute
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 interfaceSubstitution
- See Also:
-
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 classMethodBinding
- See Also:
-
genericMethod
- Overrides:
genericMethod
in classMethodBinding
-
alwaysNeedsAccessMethod
public boolean alwaysNeedsAccessMethod()Description copied from class:MethodBinding
Subtypes can override this to return true if an access method should be used when referring to this method binding. Currently used for AspectJ's inter-type method declarations.- Overrides:
alwaysNeedsAccessMethod
in classParameterizedMethodBinding
-
getAccessMethod
Description copied from class:MethodBinding
This will only be called if alwaysNeedsAccessMethod() returns true. In that case it should return the access method to be used.- Overrides:
getAccessMethod
in classParameterizedMethodBinding
-