Class/Object

org.opalj.br.analyses

MethodDeclarationContext

Related Docs: object MethodDeclarationContext | package analyses

Permalink

final class MethodDeclarationContext extends Ordered[MethodDeclarationContext]

Encapsulates the information about non-abstract, non-private, non-static methods which are 'not initializers (<(cl)init>) and which is required when determining potential call targets.

Note

Equality is defined based on the name, descriptor and declaring package of a method (the concrete declaring class is not considered!).

,

A class may have -- w.r.t. a given package name -- at most one package visible method which has a specific name and descriptor combination. For methods with protected or public visibility a class always has at most one method with a given name and descriptor.

Linear Supertypes
Ordered[MethodDeclarationContext], Comparable[MethodDeclarationContext], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MethodDeclarationContext
  2. Ordered
  3. Comparable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MethodDeclarationContext(method: Method, declaringClass: ObjectType)

    Permalink

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: MethodDeclarationContext): Boolean

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

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

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

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

    Permalink
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. def canDirectlyOverride(visibility: Option[VisibilityModifier], packageName: String): Boolean

    Permalink

    Performs the accessibility check required when we need to determine if this method (mc) overrides another method (ma).

    Performs the accessibility check required when we need to determine if this method (mc) overrides another method (ma).

    Note

    This method must be defined by a class which is a subtype of the declaring class of the other method.

  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def compare(that: MethodDeclarationContext): Int

    Permalink

    Compares this MethodDeclarationContext with the given one.

    Compares this MethodDeclarationContext with the given one. Defines a total order w.r.t. the name, descriptor and declaring package of a method. (The declaring class is not considered and, therefore, two MethodDeclarationContext may be considered equal even though the underlying method is not the same one.)

    Definition Classes
    MethodDeclarationContext → Ordered
  12. def compareAccessibilityAware(name: String, descriptor: MethodDescriptor, packageName: String): Int

    Permalink

    Compares this method (declaration context) with an (implicit) method which has the given name and descriptor and which is defined in the given package unless this method is protected or public.

    Compares this method (declaration context) with an (implicit) method which has the given name and descriptor and which is defined in the given package unless this method is protected or public. In that case the packageName is not compared and "0" (<=> equal) is returned. Hence, this compare method is well suited to make a lookup for a matching method declaration context in a sorted array of method declaration contexts.

  13. def compareTo(that: MethodDeclarationContext): Int

    Permalink
    Definition Classes
    Ordered → Comparable
  14. val declaringClass: ObjectType

    Permalink
  15. def descriptor: MethodDescriptor

    Permalink
  16. def directlyOverrides(that: MethodDeclarationContext): Boolean

    Permalink

    Returns true if this method directly overrides the given method.

    Returns true if this method directly overrides the given method.

    (Note: indirect overriding can only be determined if all intermediate methods are known; only in that case it is possible to test if, e.g., a public method in package x indirectly overrides a package visible method in a package y.)

    that

    The MethodDeclarationContext object of another method which is defined by the same class as this method or a superclass thereof. If the other method is defined by some other class with which this class is not in a sub-/supertype relation the result is not defined.

    Note

    The overrides relation is reflexive as defined by the JVM specification (Section: "Overriding").

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

    Permalink
    Definition Classes
    AnyRef
  18. def equals(other: Any): Boolean

    Permalink
    Definition Classes
    MethodDeclarationContext → AnyRef → Any
  19. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  21. def hashCode(): Int

    Permalink

    The hash code is equal to the "hashCode of the descriptor of the underlying method" * 113 + "the hashCode of the package of the declaring class".

    The hash code is equal to the "hashCode of the descriptor of the underlying method" * 113 + "the hashCode of the package of the declaring class".

    Definition Classes
    MethodDeclarationContext → AnyRef → Any
  22. def isDirectlyOverriddenBy(packageName: String): Boolean

    Permalink

    Returns true if a method with the same signature as this method that is defined in the given package directly overrides this encapsultated method.

    Returns true if a method with the same signature as this method that is defined in the given package directly overrides this encapsultated method. This property always holds if this method has public or protected visiblity. If this method has package visibility the other (implicit) method has to be defined in this method's package.

  23. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  24. def isPublic: Boolean

    Permalink
  25. val method: Method

    Permalink
  26. def name: String

    Permalink
  27. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  30. def packageName: String

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

    Permalink
    Definition Classes
    AnyRef
  32. def toString(): String

    Permalink
    Definition Classes
    MethodDeclarationContext → AnyRef → Any
  33. final def wait(): Unit

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

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

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

Inherited from Ordered[MethodDeclarationContext]

Inherited from Comparable[MethodDeclarationContext]

Inherited from AnyRef

Inherited from Any

Ungrouped