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

public class MethodBinding extends Binding
  • Felddetails

    • modifiers

      public int modifiers
    • selector

      public char[] selector
    • returnType

      public TypeBinding returnType
    • parameters

      public TypeBinding[] parameters
    • receiver

      public TypeBinding receiver
    • thrownExceptions

      public ReferenceBinding[] thrownExceptions
    • declaringClass

      public ReferenceBinding declaringClass
    • typeVariables

      public TypeVariableBinding[] typeVariables
    • tagBits

      public long tagBits
    • extendedTagBits

      public int extendedTagBits
    • typeAnnotations

      protected AnnotationBinding[] typeAnnotations
    • parameterNonNullness

      public Boolean[] parameterNonNullness
      Store nullness information from annotation (incl. applicable default).
    • defaultNullness

      public int defaultNullness
    • parameterNames

      public char[][] parameterNames
      Store parameter names from MethodParameters attribute (incl. applicable default).
  • Konstruktordetails

  • Methodendetails

    • 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)
    • asRawMethod

      public MethodBinding asRawMethod(LookupEnvironment env)
    • canBeSeenBy

      public boolean canBeSeenBy(InvocationSite invocationSite, Scope scope)
    • getVisibleBinding

      public MethodBinding getVisibleBinding(TypeBinding receiverType, InvocationSite invocationSite, Scope scope)
    • getVisibleBinding

      public MethodBinding getVisibleBinding(InvocationSite invocationSite, Scope scope)
    • findPrivilegedBinding

      public MethodBinding findPrivilegedBinding(SourceTypeBinding invocationType, InvocationSite location)
    • canBeSeenBy

      public final boolean canBeSeenBy(PackageBinding invocationPackage)
    • canBeSeenBy

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

      public List<TypeBinding> collectMissingTypes(List<TypeBinding> missingTypes)
    • computeSubstitutedMethod

      public MethodBinding computeSubstitutedMethod(MethodBinding method, LookupEnvironment env)
    • computeUniqueKey

      public char[] computeUniqueKey(boolean isLeaf)
      Setzt außer Kraft:
      computeUniqueKey in Klasse Binding
    • 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.
      Parameter:
      needToApplyReturnNonNullDefault -
      needToApplyParameterNonNullDefault -
    • fillInDefaultNonNullness18

      protected void fillInDefaultNonNullness18(AbstractMethodDeclaration sourceMethod, LookupEnvironment env)
    • findOriginalInheritedMethod

      public MethodBinding findOriginalInheritedMethod(MethodBinding inheritedMethod)
    • 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

      public AnnotationBinding[] getAnnotations()
      Setzt außer Kraft:
      getAnnotations in Klasse Binding
    • 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 Klasse Binding
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.Binding#getAnnotationTagBits()
    • getDefaultValue

      public Object getDefaultValue()
      Gibt zurück:
      the default value for this annotation method or null if there is no default value
    • getParameterAnnotations

      public AnnotationBinding[][] 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

      public TypeVariableBinding getTypeVariable(char[] variableName)
    • getAllTypeVariables

      public TypeVariableBinding[] getAllTypeVariables(boolean isDiamond)
    • 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()
      Angegeben von:
      kind in Klasse Binding
    • original

      public MethodBinding original()
      Returns the original method (as opposed to parameterized/polymorphic instances)
    • shallowOriginal

      public MethodBinding shallowOriginal()
      Strips one level of parameterization, so if both class Ungültige Eingabe: "&" method are parameterized, leave the class parameters in place.
    • genericMethod

      public MethodBinding genericMethod()
    • readableName

      public char[] readableName()
      Angegeben von:
      readableName in Klasse Binding
    • getTypeAnnotations

      public final AnnotationBinding[] getTypeAnnotations()
    • setTypeAnnotations

      public void setTypeAnnotations(AnnotationBinding[] annotations)
    • setAnnotations

      public void setAnnotations(AnnotationBinding[] annotations, boolean forceStore)
      Setzt außer Kraft:
      setAnnotations in Klasse Binding
    • setAnnotations

      public void setAnnotations(AnnotationBinding[] annotations, AnnotationBinding[][] parameterAnnotations, Object defaultValue, LookupEnvironment optionalEnv)
    • setDefaultValue

      public void setDefaultValue(Object defaultValue)
    • setParameterAnnotations

      public void setParameterAnnotations(AnnotationBinding[][] parameterAnnotations)
    • setSelector

      protected final void setSelector(char[] selector)
    • shortReadableName

      public char[] shortReadableName()
      Setzt außer Kraft:
      shortReadableName in Klasse Binding
      Siehe auch:
      • Ungültige Referenz
        org.eclipse.jdt.internal.compiler.lookup.Binding#shortReadableName()
    • signature

      public final char[] signature()
    • signature

      public char[] signature(ClassFile classFile)
    • sourceEnd

      public final int sourceEnd()
    • sourceMethod

      public AbstractMethodDeclaration sourceMethod()
    • sourceLambda

      public LambdaExpression sourceLambda()
    • sourceRecordComponent

      public RecordComponent 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

      public MethodBinding getAccessMethod(boolean staticReference)
      This will only be called if alwaysNeedsAccessMethod() returns true. In that case it should return the access method to be used.
    • 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 String toString()
      Setzt außer Kraft:
      toString in Klasse Object
    • typeVariables

      public TypeVariableBinding[] typeVariables()
    • hasNonNullDefaultForReturnType

      public boolean hasNonNullDefaultForReturnType(AbstractMethodDeclaration srcMethod)
    • hasNonNullDefaultForParameter

      public org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ParameterNonNullDefaultProvider hasNonNullDefaultForParameter(AbstractMethodDeclaration srcMethod)
    • redeclaresPublicObjectMethod

      public boolean redeclaresPublicObjectMethod(Scope scope)
    • isVoidMethod

      public boolean isVoidMethod()
    • doesParameterLengthMatch

      public boolean doesParameterLengthMatch(int suggestedParameterLength)
    • updateTypeVariableBinding

      public void updateTypeVariableBinding(TypeVariableBinding previousBinding, TypeVariableBinding updatedBinding)
    • hasPolymorphicSignature

      public boolean hasPolymorphicSignature(Scope scope)
      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.

    • Parameter:
      scope -
      Gibt zurück:
      true if the method has Polymorphic Signature