Package org.openjdk.jmc.agent.impl
Class ResolvedConvertable
- java.lang.Object
-
- org.openjdk.jmc.agent.impl.AbstractConvertable
-
- org.openjdk.jmc.agent.impl.ResolvedConvertable
-
- All Implemented Interfaces:
Convertable
public final class ResolvedConvertable extends AbstractConvertable implements Convertable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Method
converterMethod
static java.lang.String
DEFAULT_CONVERTER_METHOD
-
Constructor Summary
Constructors Constructor Description ResolvedConvertable(java.lang.String converterDefinition, java.lang.Class<?> typeToConvert)
ResolvedConvertable(java.lang.String converterDefinition, org.objectweb.asm.Type type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.lang.Class<?>
getClassFromType(org.objectweb.asm.Type type)
java.lang.Class<?>
getConverterClass()
java.lang.reflect.Method
getConverterMethod()
private static java.lang.reflect.Method
getConvertMethod(java.lang.Class<?> converterClass, java.lang.String converterDefinition, java.lang.Class<?> originalType)
private static boolean
isValidMethod(java.lang.reflect.Method m)
private static boolean
parameterIsAssignableType(java.lang.reflect.Parameter p, java.lang.Class<?> originalType)
private static java.lang.String
resolveClassName(java.lang.String converterDefinition)
private static java.lang.String
resolveMethodName(java.lang.String converterDefinition)
java.lang.String
toString()
-
Methods inherited from class org.openjdk.jmc.agent.impl.AbstractConvertable
getConverterDefinition
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.openjdk.jmc.agent.Convertable
getConverterDefinition, hasConverter
-
-
-
-
Field Detail
-
DEFAULT_CONVERTER_METHOD
public static final java.lang.String DEFAULT_CONVERTER_METHOD
- See Also:
- Constant Field Values
-
converterMethod
private final java.lang.reflect.Method converterMethod
-
-
Constructor Detail
-
ResolvedConvertable
public ResolvedConvertable(java.lang.String converterDefinition, java.lang.Class<?> typeToConvert) throws MalformedConverterException
- Throws:
MalformedConverterException
-
ResolvedConvertable
public ResolvedConvertable(java.lang.String converterDefinition, org.objectweb.asm.Type type) throws MalformedConverterException
- Throws:
MalformedConverterException
-
-
Method Detail
-
getConverterClass
public java.lang.Class<?> getConverterClass()
-
getConverterMethod
public java.lang.reflect.Method getConverterMethod()
-
getConvertMethod
private static java.lang.reflect.Method getConvertMethod(java.lang.Class<?> converterClass, java.lang.String converterDefinition, java.lang.Class<?> originalType) throws MalformedConverterException
- Throws:
MalformedConverterException
-
isValidMethod
private static boolean isValidMethod(java.lang.reflect.Method m)
-
parameterIsAssignableType
private static boolean parameterIsAssignableType(java.lang.reflect.Parameter p, java.lang.Class<?> originalType)
-
resolveClassName
private static java.lang.String resolveClassName(java.lang.String converterDefinition) throws MalformedConverterException
- Throws:
MalformedConverterException
-
resolveMethodName
private static java.lang.String resolveMethodName(java.lang.String converterDefinition) throws MalformedConverterException
- Throws:
MalformedConverterException
-
getClassFromType
private static java.lang.Class<?> getClassFromType(org.objectweb.asm.Type type) throws MalformedConverterException
- Throws:
MalformedConverterException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-