Interface IMCMethod
-
- All Known Implementing Classes:
MCMethod
public interface IMCMethod
A method representation.There are many different ways methods are represented in Mission Control and in Java: MethodIdentfier, java.lang.String, stack trace locations, profiled methods, JFR methods etc.
Some IMCMethod implementations may support a wide range of method information while others might only be able provide the basic method name. It's up to the user of this interface to examine what is available. If information is missing
null
is returned.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getFormalDescriptor()
Returns the formal descriptor.String
getMethodName()
Returns the method name not including parameters.Integer
getModifier()
Returns the modifier used in the Java class file.IMCType
getType()
Returns the class this method is declared in.Boolean
isHidden()
Whether this method is hidden.Boolean
isNative()
Whether this method is native.
-
-
-
Method Detail
-
getType
IMCType getType()
Returns the class this method is declared in.- Returns:
- the class declaring this method
-
getMethodName
String getMethodName()
Returns the method name not including parameters.An example is "mymethod". If the method is native the format is undefined.
- Returns:
- the name of this method, or
null
if unavailable
-
getFormalDescriptor
String getFormalDescriptor()
Returns the formal descriptor.For example, the method descriptor for the method
Object mymethod(int i, double d, Thread t)
is(IDLjava/lang/Thread;)Ljava/lang/Object;
- Returns:
- the formal method descriptor, or
null
if unavailable
-
getModifier
Integer getModifier()
Returns the modifier used in the Java class file.Examples of modifiers are "protected", "public", etc.
See
Modifier
for more information about the bit pattern and for methods that can be used to decode it.- Returns:
- the modifier used in the class file, or
null
if not available
-
isNative
Boolean isNative()
Whether this method is native.- Returns:
Boolean.TRUE
if the method is native,Boolean.FALSE
if not, ornull
if the information is not available
-
isHidden
Boolean isHidden()
Whether this method is hidden.- Returns:
Boolean.TRUE
if the method is hidden,Boolean.FALSE
if not, ornull
if the information is not available
-
-