|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjrockit.management.MethodIdentifier
public class MethodIdentifier
A MethodIdentifier is a serializable specification of a method in a JVM. The current implementation however lacks support of different ClassLoaders, which is needed to make a correct discrimination between different methods in the JVM.
This class is primarily used as a way to describe methods in JRockit which should be profiled in one way or another.
Constructor Summary | |
---|---|
MethodIdentifier()
Constructor normally used by the XML-framework. |
|
MethodIdentifier(javax.management.openmbean.CompositeData cd)
Constructs a MethodIdentifier from a composite data |
|
MethodIdentifier(java.lang.reflect.Method method)
Constructs a MethodIdentifier from a Method using reflection. |
|
MethodIdentifier(java.lang.String className,
java.lang.String methodName,
java.lang.String descriptor)
Construct a MethodIdentifier from a class name, a method name, and a descriptor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Indicates whether some other MethodIdentfier is "equal to" this one. |
static MethodIdentifier |
from(javax.management.openmbean.CompositeData cd)
Returns a MethodIdentifier from composite data |
static java.lang.String |
getAsHumanReadable(MethodIdentifier identifier,
boolean qualified)
Returns a String representing this method in a form convenient for humans. |
java.lang.String |
getClassName()
Returns the fully qualified class name of this method (i.e. with package name). |
java.lang.String |
getDescriptor()
Returns the descriptor of this MethodIdentfier. |
static java.lang.reflect.Method |
getMethod(java.lang.ClassLoader l,
MethodIdentifier methodIdentifier)
Returns a java method from a methodIdentifier. |
static java.lang.reflect.Method |
getMethod(java.lang.Class c,
MethodIdentifier methodIdentifier)
Returns a java method from a methodIdentifier. |
java.lang.String |
getMethodName()
Returns the method name of this MethodIdentfier. |
int |
hashCode()
Returns a hash code for this MethodIdentfier |
java.lang.String |
toHumanReadable(boolean qualified)
Returns a String representing this MethodIdentfier in a form convenient for humans to read. |
java.lang.reflect.Method |
toMethod(java.lang.Class c)
Convenience method that converts this MethodIdentifier identifier to a Method, given the qualifing Class. |
java.lang.reflect.Method |
toMethod(java.lang.ClassLoader l)
Converts this MethodIdentifier identifier to a Method, given the qualifing ClassLoader. |
java.lang.String |
toString()
Returns a string representation of this MethodIdentfier |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MethodIdentifier()
public MethodIdentifier(javax.management.openmbean.CompositeData cd)
cd
- the composite data to use to construct this MethodIdentifier.public MethodIdentifier(java.lang.String className, java.lang.String methodName, java.lang.String descriptor)
className
- the qualified class name.methodName
- the methodName.descriptor
- the formal method descriptor.public MethodIdentifier(java.lang.reflect.Method method)
method
- the reflection method to create a MethodIdentifier for.Method Detail |
---|
public java.lang.String getClassName()
public java.lang.String getMethodName()
public java.lang.String getDescriptor()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toHumanReadable(boolean qualified) throws MalformedDescriptorException
MalformedDescriptorException
public java.lang.reflect.Method toMethod(java.lang.ClassLoader l) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException, MalformedDescriptorException
l
- the ClassLoader which together with this MethodIdentifer,
defines which method to retrieve.
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
MalformedDescriptorException
public java.lang.reflect.Method toMethod(java.lang.Class c) throws java.lang.NoSuchMethodException, MalformedDescriptorException
c
- the Class which together with this MethodIdentifer, defines
which method to retrieve.
java.lang.NoSuchMethodException
MalformedDescriptorException
public static java.lang.String getAsHumanReadable(MethodIdentifier identifier, boolean qualified) throws MalformedDescriptorException
identifier
- the MethodIdentifier to get the String form for.qualified
- true if you wish for class names to be fully qualified.
MalformedDescriptorException
public static MethodIdentifier from(javax.management.openmbean.CompositeData cd)
cd
-
public static java.lang.reflect.Method getMethod(java.lang.ClassLoader l, MethodIdentifier methodIdentifier) throws java.lang.NoSuchMethodException, java.lang.ClassNotFoundException, MalformedDescriptorException
l
- the class loader, owning the method to return.methodIdentifier
- the method identifier, identifying the method.
java.lang.NoSuchMethodException
- If the method couldn't be found.
java.lang.ClassNotFoundException
- if one of the parameter types couldn't be found.
MalformedDescriptorException
public static java.lang.reflect.Method getMethod(java.lang.Class c, MethodIdentifier methodIdentifier) throws java.lang.NoSuchMethodException, MalformedDescriptorException
c
- the class, owning the method to return. May not be null.methodIdentifier
- the method identifier, identifying the method.
java.lang.NoSuchMethodException
- If the method couldn't be found.
MalformedDescriptorException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |