Packages

final class MethodDeclarationContext extends Ordered[MethodDeclarationContext]

Encapsulates the information about a non-abstract, non-private, non-static method which is not an initializer (<(cl)init>) and which is required when determining potential call targets.

Note

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.

,

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

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)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def <(that: MethodDeclarationContext): Boolean
    Definition Classes
    Ordered
  4. def <=(that: MethodDeclarationContext): Boolean
    Definition Classes
    Ordered
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def >(that: MethodDeclarationContext): Boolean
    Definition Classes
    Ordered
  7. def >=(that: MethodDeclarationContext): Boolean
    Definition Classes
    Ordered
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def canDirectlyOverride(visibility: Option[VisibilityModifier], packageName: String): Boolean

    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
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. def compare(that: MethodDeclarationContext): Int

    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 MethodDeclarationContexts may be considered equal even though the underlying method is not the same one.)

    Definition Classes
    MethodDeclarationContext → Ordered
  12. def compareAccessibilityAware(declaringClass: ObjectType, m: Method): Int
  13. def compareAccessibilityAware(packageName: String, name: String, descriptor: MethodDescriptor): Int

    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.

  14. def compareTo(that: MethodDeclarationContext): Int
    Definition Classes
    Ordered → Comparable
  15. def compareWithPublicMethod(thatMethod: Method): Int
  16. def declaringClassType: ObjectType
  17. def descriptor: MethodDescriptor
  18. def directlyOverrides(that: MethodDeclarationContext): Boolean

    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").

  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def equals(other: Any): Boolean
    Definition Classes
    MethodDeclarationContext → AnyRef → Any
  21. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. def hashCode(): Int

    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
  24. def isDirectlyOverriddenBy(packageName: String): Boolean

    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.

  25. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  26. def isPublic: Boolean
  27. val method: Method
  28. def name: String
  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. def packageName: String
  33. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  34. def toString(): String
    Definition Classes
    MethodDeclarationContext → AnyRef → Any
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Ordered[MethodDeclarationContext]

Inherited from Comparable[MethodDeclarationContext]

Inherited from AnyRef

Inherited from Any

Ungrouped