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.
If this method represents a method of an annotation that defines a default value then this value is returned.
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.
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.).
The body of the method if any.
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.
This method's descriptor.
Returns true if this method has the given name and descriptor.
Returns true if this method has the given name and descriptor.
When matching the descriptor the return type is also taken into consideration.
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.
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.)
Returns true if this method has the given name and descriptor.
Returns true if this method has the given name and descriptor.
If false (default), then the return type is taken
into consideration. This models the behavior of the JVM w.r.t. method
dispatch.
Returns true if this (field, method, class) declaration is declared as deprecated.
Returns true if this (field, method, class) declaration is declared as deprecated.
The deprecated attribute is always set by the Java compiler when either the deprecated annotation or the JavaDoc tag is used.
True if the Synthetic access flag or attribute is used.
True if the Synthetic access flag or attribute is used.
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.
Returns true if this method declares a virtual method.
Returns true if this method declares a virtual method. This method may be abstract!
Each method optionally defines a method type signature.
The name of the method.
The name of the method. The name is interned (see String.intern()
for details) to enable reference comparisons.
The number of explicit and implicit – that is, including this in case of a
non-static method – parameters of this method.
The number of registers required to store this method's parameters ( including the self reference if necessary).
Represents a single method.
Method objects are constructed using the companion object's factory methods.
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 usingProject'sclassFile(Method)method.