Class/Object

org.opalj.br

Method

Related Docs: object Method | package br

Permalink

final class Method extends ClassMember with Ordered[Method] with InstructionsContainer

Represents a single method.

Method objects are constructed using the companion object's factory methods.

Note

Equality of methods is – by purpose – reference based.

,

Methods have – by default – no link to their defining ClassFile. However, if a analyses.Project is available then it is possible to get a Method's ClassFile by using Project's classFile(Method) method.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Method
  2. InstructionsContainer
  3. Ordered
  4. Comparable
  5. ClassMember
  6. ConcreteSourceElement
  7. SourceElement
  8. CommonSourceElementAttributes
  9. CommonAttributes
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def <(that: Method): Boolean

    Permalink
    Definition Classes
    Ordered
  4. def <=(that: Method): Boolean

    Permalink
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def >(that: Method): Boolean

    Permalink
    Definition Classes
    Ordered
  7. def >=(that: Method): Boolean

    Permalink
    Definition Classes
    Ordered
  8. val accessFlags: Int

    Permalink

    The access flags of this method.

    The access flags of this method. Though it is possible to directly work with the accessFlags field, it may be more convenient to use the respective methods (isNative, isAbstract,...) to query the access flags.

    Definition Classes
    MethodConcreteSourceElement
  9. def annotationDefault: Option[ElementValue]

    Permalink

    If this method represents a method of an annotation that defines a default value then this value is returned.

  10. def annotations: Annotations

    Permalink

    The list of all annotations.

    The list of all annotations. In general, if a specific annotation is searched for the method runtimeVisibleAnnotations or runtimeInvisibleAnnotations should be used.

    Definition Classes
    CommonSourceElementAttributes
  11. def asClassFile: ClassFile

    Permalink
    Definition Classes
    SourceElement
  12. def asField: Field

    Permalink
    Definition Classes
    SourceElement
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. final def asMethod: Method.this.type

    Permalink
    Definition Classes
    MethodSourceElement
  15. def asVirtualMethod(declaringClassType: ObjectType): VirtualMethod

    Permalink
  16. final def asVirtualMethod(declaringClassFile: ClassFile): VirtualMethod

    Permalink
  17. val attributes: Attributes

    Permalink

    This method's defined attributes.

    This method's defined attributes. (Which attributes are available generally depends on the configuration of the class file reader. However, the Code_Attribute is – if it was loaded – always directly accessible by means of the body attribute.).

    Definition Classes
    MethodCommonAttributes
  18. val body: Option[Code]

    Permalink

    The body of the method if any.

  19. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def compare(otherName: String, otherDescriptor: MethodDescriptor): Int

    Permalink
  21. def compare(other: Method): Int

    Permalink

    Defines an absolute order on Method instances based on their method signatures.

    Defines an absolute order on Method instances based on their method signatures.

    The order is defined by lexicographically comparing the names of the methods and – in case that the names of both methods are identical – by comparing their method descriptors.

    Definition Classes
    Method → Ordered
  22. def compareTo(that: Method): Int

    Permalink
    Definition Classes
    Ordered → Comparable
  23. def copy(accessFlags: Int = this.accessFlags, name: String = this.name, descriptor: MethodDescriptor = this.descriptor, body: Option[Code] = this.body, attributes: Attributes = this.attributes): Method

    Permalink
  24. val descriptor: MethodDescriptor

    Permalink

    This method's descriptor.

  25. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  27. def exceptionTable: Option[ExceptionTable]

    Permalink
  28. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  29. final def foreachTypeAnnotation[U](f: (TypeAnnotation) ⇒ U): Unit

    Permalink
    Definition Classes
    CommonAttributes
  30. def fullyQualifiedSignature(declaringClassType: ObjectType): String

    Permalink
  31. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def hasDefaultVisibility: Boolean

    Permalink
    Definition Classes
    ClassMember
  33. def hasSignature(name: String, descriptor: MethodDescriptor): Boolean

    Permalink

    Returns true if this method has the given name and descriptor.

    Returns true if this method has the given name and descriptor.

    Note

    When matching the descriptor the return type is also taken into consideration.

  34. def hasSignature(other: Method, ignoreReturnType: Boolean = false): Boolean

    Permalink

    Returns true if this method and the given method have the same signature.

    Returns true if this method and the given method have the same signature.

    ignoreReturnType

    If false (default), then the return type is taken into consideration. This models the behavior of the JVM w.r.t. method dispatch. However, if you want to determine whether this method potentially overrides the given one, you may want to specify that you want to ignore the return type. (The Java compiler generate the appropriate methods.)

  35. def hasSignature(name: String, descriptor: MethodDescriptor, ignoreReturnType: Boolean): Boolean

    Permalink

    Returns true if this method has the given name and descriptor.

    Returns true if this method has the given name and descriptor.

    ignoreReturnType

    If false (default), then the return type is taken into consideration. This models the behavior of the JVM w.r.t. method dispatch.

  36. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  37. final def instructionsOption: Option[Array[Instruction]]

    Permalink
    Definition Classes
    MethodInstructionsContainer
  38. final def isAbstract: Boolean

    Permalink
  39. final def isBridge: Boolean

    Permalink
  40. def isClass: Boolean

    Permalink
    Definition Classes
    SourceElement
  41. final def isConstructor: Boolean

    Permalink
  42. def isDeprecated: Boolean

    Permalink

    Returns true if this (field, method, class) declaration is declared as deprecated.

    Returns true if this (field, method, class) declaration is declared as deprecated.

    Note

    The deprecated attribute is always set by the Java compiler when either the deprecated annotation or the JavaDoc tag is used.

    Definition Classes
    CommonSourceElementAttributes
  43. def isField: Boolean

    Permalink
    Definition Classes
    SourceElement
  44. final def isFinal: Boolean

    Permalink
    Definition Classes
    ClassMember
  45. final def isInitializer: Boolean

    Permalink
  46. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  47. final def isMethod: Boolean

    Permalink
    Definition Classes
    MethodSourceElement
  48. final def isNative: Boolean

    Permalink
  49. final def isNativeAndVarargs: Boolean

    Permalink
  50. final def isNotAbstract: Boolean

    Permalink
  51. final def isNotFinal: Boolean

    Permalink
    Definition Classes
    ClassMember
  52. final def isNotStatic: Boolean

    Permalink
    Definition Classes
    ClassMember
  53. final def isPackagePrivate: Boolean

    Permalink
    Definition Classes
    ClassMember
  54. final def isPrivate: Boolean

    Permalink
    Definition Classes
    ClassMember
  55. final def isProtected: Boolean

    Permalink
    Definition Classes
    ClassMember
  56. final def isPublic: Boolean

    Permalink
    Definition Classes
    ClassMember
  57. final def isStatic: Boolean

    Permalink
    Definition Classes
    ClassMember
  58. final def isStaticInitializer: Boolean

    Permalink
  59. final def isStrict: Boolean

    Permalink
  60. final def isSynchronized: Boolean

    Permalink
  61. final def isSynthetic: Boolean

    Permalink

    True if the Synthetic access flag or attribute is used.

    True if the Synthetic access flag or attribute is used.

    Definition Classes
    ClassMemberCommonSourceElementAttributes
  62. final def isVarargs: Boolean

    Permalink
  63. def isVirtual: Boolean

    Permalink
    Definition Classes
    SourceElement
  64. final def isVirtualCallTarget: Boolean

    Permalink

    Returns true if this method is a potential target of a virtual call by means of an invokevirtual or invokeinterface instruction; i.e., if the method is not an initializer, is not abstract, is not private and is not static.

  65. final def isVirtualMethodDeclaration: Boolean

    Permalink

    Returns true if this method declares a virtual method.

    Returns true if this method declares a virtual method. This method may be abstract!

  66. def methodTypeSignature: Option[MethodTypeSignature]

    Permalink

    Each method optionally defines a method type signature.

  67. val name: String

    Permalink

    The name of the method.

    The name of the method. The name is interned (see String.intern() for details) to enable reference comparisons.

    Definition Classes
    MethodClassMember
  68. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  69. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  70. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  71. def parameterAnnotations: ParameterAnnotations

    Permalink
  72. def parameterTypes: IndexedSeq[FieldType]

    Permalink
  73. def parametersCount: Int

    Permalink

    The number of explicit and implicit – that is, including this in case of a non-static method – parameters of this method.

  74. def requiredRegisters: Int

    Permalink

    The number of registers required to store this method's parameters ( including the self reference if necessary).

  75. def returnType: Type

    Permalink
  76. def runtimeInvisibleAnnotations: Annotations

    Permalink
  77. def runtimeInvisibleParameterAnnotations: ParameterAnnotations

    Permalink
  78. def runtimeInvisibleTypeAnnotations: TypeAnnotations

    Permalink
    Definition Classes
    CommonAttributes
  79. def runtimeVisibleAnnotations: Annotations

    Permalink
  80. def runtimeVisibleParameterAnnotations: ParameterAnnotations

    Permalink
  81. def runtimeVisibleTypeAnnotations: TypeAnnotations

    Permalink
    Definition Classes
    CommonAttributes
  82. def signature: MethodSignature

    Permalink
  83. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  84. def toJava(declaringType: ObjectType, methodInfo: String): String

    Permalink
  85. def toJava(methodInfo: String)(implicit project: ClassFileRepository): String

    Permalink
  86. def toJava(declaringClass: ClassFile, methodInfo: String): String

    Permalink
  87. def toJava(declaringType: ObjectType): String

    Permalink
  88. def toJava(project: ClassFileRepository): String

    Permalink
  89. def toJava(declaringClass: ClassFile): String

    Permalink
  90. def toJava(): String

    Permalink
  91. def toString(): String

    Permalink
    Definition Classes
    Method → AnyRef → Any
  92. def visibilityModifier: Option[VisibilityModifier]

    Permalink
    Definition Classes
    ConcreteSourceElement
  93. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  94. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  95. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from InstructionsContainer

Inherited from Ordered[Method]

Inherited from Comparable[Method]

Inherited from ClassMember

Inherited from ConcreteSourceElement

Inherited from SourceElement

Inherited from CommonAttributes

Inherited from AnyRef

Inherited from Any

Ungrouped