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).
This method must be defined by a class which is a subtype of the declaring class of the other method.
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.)
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.
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.)
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.
The overrides relation is reflexive as defined by the JVM specification (Section: "Overriding").
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".
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.
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.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.