public class DescriptorUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
BOOLEAN_CLASS_DESCRIPTOR |
static String |
BYTE_CLASS_DESCRIPTOR |
static String |
CHAR_CLASS_DESCRIPTOR |
static String |
DOUBLE_CLASS_DESCRIPTOR |
static String |
FLOAT_CLASS_DESCRIPTOR |
static String |
INT_CLASS_DESCRIPTOR |
static String |
LONG_CLASS_DESCRIPTOR |
static String |
SHORT_CLASS_DESCRIPTOR |
static String |
VOID_CLASS_DESCRIPTOR |
Modifier and Type | Method and Description |
---|---|
static String |
classToStringRepresentation(Class<?> c) |
static String[] |
descriptorStringToParameterArray(String methodDescriptor)
returns an array of String representations of the parameter types.
|
static String |
getConstructorDescriptor(Constructor<?> c) |
static String |
getMethodDescriptor(Method m) |
static String |
getMethodDescriptor(String[] parameters,
String returnType) |
static String[] |
getParameterTypes(Class<?>[] parameters) |
static String[] |
getParameterTypes(Method m) |
static boolean |
isPrimitive(String descriptor)
returns true if the descriptor represents a primitive type
|
static boolean |
isWide(Class<?> cls)
returns true if the class represents a long or a double
|
static boolean |
isWide(String descriptor)
returns true if the descriptor represents a long or a double
|
public static final String VOID_CLASS_DESCRIPTOR
public static final String BYTE_CLASS_DESCRIPTOR
public static final String CHAR_CLASS_DESCRIPTOR
public static final String DOUBLE_CLASS_DESCRIPTOR
public static final String FLOAT_CLASS_DESCRIPTOR
public static final String INT_CLASS_DESCRIPTOR
public static final String LONG_CLASS_DESCRIPTOR
public static final String SHORT_CLASS_DESCRIPTOR
public static final String BOOLEAN_CLASS_DESCRIPTOR
public static String[] descriptorStringToParameterArray(String methodDescriptor)
public static boolean isPrimitive(String descriptor)
public static boolean isWide(String descriptor)
public static boolean isWide(Class<?> cls)
public static String getConstructorDescriptor(Constructor<?> c)
Copyright © 2016. All rights reserved.