Class UnresolvedXMethod

All Implemented Interfaces:
AccessibleEntity, ClassMember, ComparableMethod, XMethod, AnnotatedObject, FieldOrMethodName, Serializable, Comparable<ComparableMethod>

class UnresolvedXMethod extends AbstractMethod
XMethod implementation for unresolvable methods. Returns some kind of reasonable default answer to questions that can't be answered (e.g., what are the access flags).
  • Field Details

  • Constructor Details

  • Method Details

    • isReturnTypeReferenceType

      public boolean isReturnTypeReferenceType()
      Returns:
      true if method's return type is a reference type, false otherwise
    • compareTo

      public int compareTo(ComparableMethod o)
    • getElementType

      public ElementType getElementType()
    • getContainingScope

      @CheckForNull public AnnotatedObject getContainingScope()
    • getThrownExceptions

      public String[] getThrownExceptions()
      Returns:
      the exceptions this method is declared to throw
    • isUnconditionalThrower

      public boolean isUnconditionalThrower()
      Returns:
      does this method unconditionally throw an exception?
    • isUnsupported

      public boolean isUnsupported()
      Returns:
      does this method unconditionally throw an UnsupportedOperationException?
    • isAbstract

      public boolean isAbstract()
    • isSynthetic

      public boolean isSynthetic()
      Description copied from interface: AccessibleEntity
      Is the entity synthetic?
    • isDeprecated

      public boolean isDeprecated()
      Description copied from interface: AccessibleEntity
      Is the entity deprecated?
    • isVarArgs

      public boolean isVarArgs()
      Returns:
      is this a var args method?
    • usesConcurrency

      public boolean usesConcurrency()
      Returns:
      does the method directly make use of concurrency/threads/synchronization?
    • getSourceSignature

      @CheckForNull public String getSourceSignature()
      Description copied from interface: ClassMember
      Get the signature representing the field/method's type, including generic type
    • isStub

      public boolean isStub()
      Returns:
      is the method a synthetic stub method?
    • isIdentity

      public boolean isIdentity()
      Description copied from interface: XMethod
      Is this an identity method
    • addParameterAnnotation

      public void addParameterAnnotation(int param, AnnotationValue annotationValue)
      Description copied from interface: XMethod
      Destructively add a parameter annotation.
      Parameters:
      param - parameter (0 == first parameter)
      annotationValue - an AnnotationValue representing a parameter annotation
    • getParameterAnnotationDescriptors

      public Collection<ClassDescriptor> getParameterAnnotationDescriptors(int param)
      Description copied from interface: XMethod
      Get ClassDescriptors (annotation classes) of annotations applied directly to this method's parameters.
      Parameters:
      param - parameter number (0 for first parameter)
      Returns:
      ClassDescriptors of annotations applied directly to this method's parameters
    • hasParameterAnnotations

      public boolean hasParameterAnnotations()
    • getParameterAnnotation

      @Nullable public AnnotationValue getParameterAnnotation(int param, ClassDescriptor desc)
      Description copied from interface: XMethod
      Get the AnnotationValue of annotation applied directly to given parameter.
      Parameters:
      param - parameter number (0 for first parameter)
      desc - ClassDescriptor of the annotation class
      Returns:
      AnnotationValue annotating the parameter, or null if parameter is not annotated with this kind of annotation
    • getParameterAnnotations

      public Collection<AnnotationValue> getParameterAnnotations(int param)
      Description copied from interface: XMethod
      Get collection of all AnnotationValues applied directly to given parameter.
      Parameters:
      param - parameter number (0 for first parameter)
      Returns:
      Collection of all AnnotationValues applied directly to given parameter
    • addAnnotation

      public void addAnnotation(AnnotationValue annotationValue)
      Description copied from interface: XMethod
      Destructively add an annotation. We do this for "built-in" annotations that might not be directly evident in the code. It's not a great idea in general, but we can get away with it as long as it's done early enough (i.e., before anyone asks what annotations this method has.)
      Parameters:
      annotationValue - an AnnotationValue representing a method annotation
    • getAnnotationDescriptors

      public Collection<ClassDescriptor> getAnnotationDescriptors()
      Description copied from interface: XMethod
      Get ClassDescriptors (annotation classes) of annotations applied directly to this method.
      Returns:
      ClassDescriptors of annotations applied directly to this method
    • getAnnotation

      public AnnotationValue getAnnotation(ClassDescriptor desc)
      Description copied from interface: XMethod
      Get the AnnotationValue of annotation applied directly to the method.
      Parameters:
      desc - ClassDescriptor of the annotation class
      Returns:
      AnnotationValue annotating the method, or null if method is not annotated with this kind of annotation
    • getAnnotations

      public Collection<AnnotationValue> getAnnotations()
      Description copied from interface: XMethod
      Get collection of all AnnotationValues applied directly to the method.
      Returns:
      Collection of all AnnotationValues applied directly to the method
    • bridgeFrom

      public XMethod bridgeFrom()
    • bridgeTo

      public XMethod bridgeTo()
      Description copied from interface: XMethod
      If nonnull, then this method is a synthetic method that overrides a method in a superclass. This method simply forwards the call to the method it bridges to, which is a method with an identical name but possibly co-variant arguments and return values.
    • getAccessMethodForMethod

      public MethodDescriptor getAccessMethodForMethod()
    • getAccessMethodForField

      public FieldDescriptor getAccessMethodForField()
    • isVariableSynthetic

      public boolean isVariableSynthetic(int param)
      Description copied from interface: XMethod
      Is the variable synthetic?
    • usesInvokeDynamic

      public boolean usesInvokeDynamic()
    • hasPolymorphicSignature

      public boolean hasPolymorphicSignature()
      Description copied from interface: XMethod
      See java.lang.invoke.MethodHandle.PolymorphicSignature
      Returns:
      is this method polymorphic as defined in MethodHandle