final class MethodDeclarationContext extends Ordered[MethodDeclarationContext]
Encapsulates the information about a non-abstract, non-static method which is
not an initializer (<(cl)init>
) and which is required when determining potential call
targets.
- Source
- MethodDeclarationContext.scala
- 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!).
- Alphabetic
- By Inheritance
- MethodDeclarationContext
- Ordered
- Comparable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def <(that: MethodDeclarationContext): Boolean
- Definition Classes
- Ordered
- def <=(that: MethodDeclarationContext): Boolean
- Definition Classes
- Ordered
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >(that: MethodDeclarationContext): Boolean
- Definition Classes
- Ordered
- def >=(that: MethodDeclarationContext): Boolean
- Definition Classes
- Ordered
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- 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, twoMethodDeclarationContext
s may be considered equal even though the underlying method is not the same one.)- Definition Classes
- MethodDeclarationContext → Ordered
- def compareAccessibilityAware(declaringClass: ObjectType, m: Method): Int
- def compareAccessibilityAware(packageName: String, name: String, descriptor: MethodDescriptor): Int
Compares this method (declaration context) with an (implicit) method which has the given
name
anddescriptor
and which is defined in the givenpackage
unless this method is protected or public.Compares this method (declaration context) with an (implicit) method which has the given
name
anddescriptor
and which is defined in the givenpackage
unless this method is protected or public. In that case thepackageName
is not compared and "0" (<=> equal) is returned. Hence, thiscompare
method is well suited to make a lookup for a matching method declaration context in a sorted array of method declaration contexts. - def compareTo(that: MethodDeclarationContext): Int
- Definition Classes
- Ordered → Comparable
- def compareWithPublicMethod(thatMethod: Method): Int
- def declaringClassType: ObjectType
- def descriptor: MethodDescriptor
- 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").
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(other: Any): Boolean
- Definition Classes
- MethodDeclarationContext → AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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
- 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.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPublic: Boolean
- val method: Method
- def name: String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def packageName: String
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- MethodDeclarationContext → AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated