Interface IMCMethod
-
- All Known Implementing Classes:
MCMethod
,StructTypes.JfrMethod
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 java.lang.String
getFormalDescriptor()
Returns the formal descriptor.java.lang.String
getMethodName()
Returns the method name not including parameters.java.lang.Integer
getModifier()
Returns the modifier used in the Java class file.IMCType
getType()
Returns the class this method is declared in.java.lang.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
java.lang.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
java.lang.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
java.lang.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
java.lang.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
-
-