Klasse MethodBinding
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding
- Bekannte direkte Unterklassen:
InterTypeMethodBinding
,MostSpecificExceptionMethodBinding
,ParameterizedMethodBinding
,PolymorphicMethodBinding
,ProblemMethodBinding
,SyntheticFactoryMethodBinding
,SyntheticMethodBinding
-
Feldübersicht
Modifizierer und TypFeldBeschreibungint
int
int
char[][]
Store parameter names from MethodParameters attribute (incl. applicable default).Boolean[]
Store nullness information from annotation (incl. applicable default).char[]
long
protected AnnotationBinding[]
Von Klasse geerbte Felder 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
-
Konstruktorübersicht
ModifiziererKonstruktorBeschreibungprotected
MethodBinding
(int modifiers, char[] selector, TypeBinding returnType, TypeBinding[] parameters, ReferenceBinding[] thrownExceptions, ReferenceBinding declaringClass) MethodBinding
(int modifiers, TypeBinding[] parameters, ReferenceBinding[] thrownExceptions, ReferenceBinding declaringClass) MethodBinding
(MethodBinding initialMethodBinding, ReferenceBinding declaringClass) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
Subtypes can override this to return true if an access method should be used when referring to this method binding.final boolean
final boolean
areParametersCompatibleWith
(TypeBinding[] arguments) final boolean
areParametersEqual
(MethodBinding method) final boolean
boolean
canBeSeenBy
(InvocationSite invocationSite, Scope scope) final boolean
canBeSeenBy
(PackageBinding invocationPackage) boolean
canBeSeenBy
(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) collectMissingTypes
(List<TypeBinding> missingTypes) final char[]
computeSignature
(ClassFile classFile) computeSubstitutedMethod
(MethodBinding method, LookupEnvironment env) char[]
computeUniqueKey
(boolean isLeaf) final char[]
boolean
doesParameterLengthMatch
(int suggestedParameterLength) protected void
fillInDefaultNonNullness
(AbstractMethodDeclaration sourceMethod, boolean needToApplyReturnNonNullDefault, org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterNonNullDefaultProvider needToApplyParameterNonNullDefault) After method verifier has finished, fill in missing @NonNull specification from the applicable default.protected void
fillInDefaultNonNullness18
(AbstractMethodDeclaration sourceMethod, LookupEnvironment env) findOriginalInheritedMethod
(MethodBinding inheritedMethod) findPrivilegedBinding
(SourceTypeBinding invocationType, InvocationSite location) char[]
Ungültige Eingabe: "<"typeParam1 ... typeParamM>(param1 ... paramN)returnType thrownException1 ... thrownExceptionP T foo(T t) throws X---> (TT;)TT;LXUngültige Eingabe: "<"TT;>; void bar(X t) --> (LXUngültige Eingabe: "<"TT;>;)V void bar(X t) --> Ungültige Eingabe: "<"T:Ljava.lang.Object;>(LXUngültige Eingabe: "<"TT;>;)V final int
getAccessMethod
(boolean staticReference) This will only be called if alwaysNeedsAccessMethod() returns true.getAllTypeVariables
(boolean isDiamond) long
Compute the tagbits for standard annotations.final AnnotationBinding[]
getTypeVariable
(char[] variableName) getVisibleBinding
(InvocationSite invocationSite, Scope scope) getVisibleBinding
(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterNonNullDefaultProvider
boolean
boolean
hasPolymorphicSignature
(Scope scope) Identifies whether the method has Polymorphic signature based on jls-15.12.3
Definition reproduced here.boolean
Returns true if method got substituted parameter types (see ParameterizedMethodBinding)boolean
final boolean
final boolean
isBridge()
final boolean
final boolean
final boolean
final boolean
final boolean
boolean
final boolean
boolean
isFinal()
final boolean
final boolean
final boolean
isMain()
final boolean
isNative()
final boolean
final boolean
boolean
boolean
final boolean
final boolean
final boolean
isPublic()
final boolean
isStatic()
final boolean
final boolean
final boolean
final boolean
isUsed()
boolean
final boolean
boolean
final int
kind()
original()
Returns the original method (as opposed to parameterized/polymorphic instances)char[]
boolean
void
setAnnotations
(AnnotationBinding[] annotations, boolean forceStore) void
setAnnotations
(AnnotationBinding[] annotations, AnnotationBinding[][] parameterAnnotations, Object defaultValue, LookupEnvironment optionalEnv) void
setDefaultValue
(Object defaultValue) void
setParameterAnnotations
(AnnotationBinding[][] parameterAnnotations) protected final void
setSelector
(char[] selector) void
setTypeAnnotations
(AnnotationBinding[] annotations) Strips one level of parameterization, so if both class Ungültige Eingabe: "&" method are parameterized, leave the class parameters in place.char[]
final char[]
char[]
final int
final int
Returns the method to use during tiebreak (usually the method itself).toString()
void
updateTypeVariableBinding
(TypeVariableBinding previousBinding, TypeVariableBinding updatedBinding) Von Klasse geerbte Methoden org.aspectj.org.eclipse.jdt.internal.compiler.lookup.Binding
computeUniqueKey, initializeDeprecatedAnnotationTagBits, isAnnotationType, isParameter, isTaggedRepeatable, isValid, isValidBinding, isVolatile, problemId, setAnnotations
-
Felddetails
-
modifiers
public int modifiers -
selector
public char[] selector -
returnType
-
parameters
-
receiver
-
thrownExceptions
-
declaringClass
-
typeVariables
-
tagBits
public long tagBits -
extendedTagBits
public int extendedTagBits -
typeAnnotations
-
parameterNonNullness
Store nullness information from annotation (incl. applicable default). -
defaultNullness
public int defaultNullness -
parameterNames
public char[][] parameterNamesStore parameter names from MethodParameters attribute (incl. applicable default).
-
-
Konstruktordetails
-
MethodBinding
protected MethodBinding() -
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
-
-
Methodendetails
-
areParameterErasuresEqual
-
areParametersCompatibleWith
-
areParametersEqual
-
areTypeVariableErasuresEqual
-
asRawMethod
-
canBeSeenBy
-
getVisibleBinding
public MethodBinding getVisibleBinding(TypeBinding receiverType, InvocationSite invocationSite, Scope scope) -
getVisibleBinding
-
findPrivilegedBinding
public MethodBinding findPrivilegedBinding(SourceTypeBinding invocationType, InvocationSite location) -
canBeSeenBy
-
canBeSeenBy
-
collectMissingTypes
-
computeSubstitutedMethod
-
computeUniqueKey
public char[] computeUniqueKey(boolean isLeaf) - Setzt außer Kraft:
computeUniqueKey
in KlasseBinding
-
constantPoolName
public final char[] constantPoolName() -
fillInDefaultNonNullness
protected void fillInDefaultNonNullness(AbstractMethodDeclaration sourceMethod, boolean needToApplyReturnNonNullDefault, org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterNonNullDefaultProvider needToApplyParameterNonNullDefault) After method verifier has finished, fill in missing @NonNull specification from the applicable default. -
fillInDefaultNonNullness18
protected void fillInDefaultNonNullness18(AbstractMethodDeclaration sourceMethod, LookupEnvironment env) -
findOriginalInheritedMethod
-
genericSignature
public char[] genericSignature()Ungültige Eingabe: "<"typeParam1 ... typeParamM>(param1 ... paramN)returnType thrownException1 ... thrownExceptionP T foo(T t) throws X
---> (TT;)TT;LXUngültige Eingabe: "<"TT;>; void bar(X t) --> (LXUngültige Eingabe: "<"TT;>;)V void bar(X t) --> Ungültige Eingabe: "<"T:Ljava.lang.Object;>(LXUngültige Eingabe: "<"TT;>;)V -
getAccessFlags
public final int getAccessFlags() -
getAnnotations
- Setzt außer Kraft:
getAnnotations
in KlasseBinding
-
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.- Setzt außer Kraft:
getAnnotationTagBits
in KlasseBinding
- Siehe auch:
-
getDefaultValue
- Gibt zurück:
- the default value for this annotation method or
null
if there is no default value
-
getParameterAnnotations
- Gibt zurück:
- the annotations for each of the method parameters or
null>
if there's no parameter or no annotation at all.
-
getTypeVariable
-
getAllTypeVariables
-
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() -
isCanonicalConstructor
public final boolean isCanonicalConstructor() -
isCompactConstructor
public final boolean isCompactConstructor() -
isDefault
public final boolean isDefault() -
isDefaultAbstract
public final boolean isDefaultAbstract() -
isDefaultMethod
public boolean isDefaultMethod() -
isDeprecated
public final boolean isDeprecated() -
isFinal
public boolean isFinal() -
isImplementing
public final boolean isImplementing() -
isImplicit
public final boolean isImplicit() -
isMain
public final boolean isMain() -
isNative
public final boolean isNative() -
isOverriding
public final boolean isOverriding() -
isPrivate
public final boolean isPrivate() -
isOrEnclosedByPrivateType
public final boolean isOrEnclosedByPrivateType() -
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 boolean isVarargs() -
isParameterizedGeneric
public boolean isParameterizedGeneric() -
isPolymorphic
public boolean isPolymorphic() -
isViewedAsDeprecated
public final boolean isViewedAsDeprecated() -
kind
public final int kind() -
original
Returns the original method (as opposed to parameterized/polymorphic instances) -
shallowOriginal
Strips one level of parameterization, so if both class Ungültige Eingabe: "&" method are parameterized, leave the class parameters in place. -
genericMethod
-
readableName
public char[] readableName()- Angegeben von:
readableName
in KlasseBinding
-
getTypeAnnotations
-
setTypeAnnotations
-
setAnnotations
- Setzt außer Kraft:
setAnnotations
in KlasseBinding
-
setAnnotations
public void setAnnotations(AnnotationBinding[] annotations, AnnotationBinding[][] parameterAnnotations, Object defaultValue, LookupEnvironment optionalEnv) -
setDefaultValue
-
setParameterAnnotations
-
setSelector
protected final void setSelector(char[] selector) -
shortReadableName
public char[] shortReadableName()- Setzt außer Kraft:
shortReadableName
in KlasseBinding
- Siehe auch:
-
signature
public final char[] signature() -
computeSignature
-
signature
-
sourceEnd
public final int sourceEnd() -
sourceMethod
-
sourceLambda
-
sourceRecordComponent
-
sourceStart
public final int sourceStart() -
alwaysNeedsAccessMethod
public boolean alwaysNeedsAccessMethod()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. -
getAccessMethod
This will only be called if alwaysNeedsAccessMethod() returns true. In that case it should return the access method to be used. -
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
-
typeVariables
-
hasNonNullDefaultForReturnType
-
hasNonNullDefaultForParameter
public org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterNonNullDefaultProvider hasNonNullDefaultForParameter(AbstractMethodDeclaration srcMethod) -
redeclaresPublicObjectMethod
-
isVoidMethod
public boolean isVoidMethod() -
doesParameterLengthMatch
public boolean doesParameterLengthMatch(int suggestedParameterLength) -
updateTypeVariableBinding
public void updateTypeVariableBinding(TypeVariableBinding previousBinding, TypeVariableBinding updatedBinding) -
hasPolymorphicSignature
Identifies whether the method has Polymorphic signature based on jls-15.12.3
Definition reproduced here.
A method is signature polymorphic if all of the following are true:- It is declared in the java.lang.invoke.MethodHandle class or the java.lang.invoke.VarHandle class.
- It has a single variable arity parameter (§8.4.1) whose declared type is Object[].
- It is native.
- Gibt zurück:
- true if the method has Polymorphic Signature
-