public class PlasticInternalUtils extends Object
Constructor and Description |
---|
PlasticInternalUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
capitalize(String input)
Capitalizes the input string, converting the first character to upper case.
|
static void |
close(Closeable closeable) |
static org.apache.tapestry5.internal.plastic.asm.tree.ClassNode |
convertBytecodeToClassNode(byte[] bytecode) |
static String |
dissasembleBytecode(org.apache.tapestry5.internal.plastic.asm.tree.ClassNode classNode) |
static Object |
getFromInstanceContext(InstanceContext context,
String javaName) |
static boolean |
isBlank(String input) |
static boolean |
isEmpty(Object[] input) |
static boolean |
isEqual(Object left,
Object right)
Returns true if both objects are the same instance, or both null, or left equals right.
|
static boolean |
isNonBlank(String input) |
static <K,V> ConcurrentMap<K,V> |
newConcurrentMap() |
static <T> List<T> |
newList() |
static <K,V> Map<K,V> |
newMap() |
static <T> Set<T> |
newSet() |
static String |
objectDescriptorToClassName(String descriptor)
Converts an object type descriptor (i.e.
|
static String[] |
orEmpty(String[] input) |
static byte[] |
readBytecodeForClass(ClassLoader loader,
String className,
boolean mustExist) |
static Class |
toClass(ClassLoader loader,
String javaName) |
static String |
toClassName(String internalName)
Converts a class's internal name (i.e., using slashes)
to Java source code format (i.e., using periods).
|
static String |
toClassPath(String className) |
static String |
toDescriptor(String className)
Converts a primitive type or fully qualified class name (or array form) to
a descriptor.
|
static String |
toInternalName(String className) |
static String |
toMessage(Throwable t) |
static MethodDescription |
toMethodDescription(org.apache.tapestry5.internal.plastic.asm.tree.MethodNode node) |
static String |
toPropertyName(String fieldName)
Strips out leading and trailing underscores, leaving the real property name.
|
public PlasticInternalUtils()
public static boolean isNonBlank(String input)
public static String toInternalName(String className)
public static String toClassPath(String className)
public static MethodDescription toMethodDescription(org.apache.tapestry5.internal.plastic.asm.tree.MethodNode node)
public static String toClassName(String internalName)
public static String toDescriptor(String className)
public static String objectDescriptorToClassName(String descriptor)
public static <K,V> ConcurrentMap<K,V> newConcurrentMap()
public static String dissasembleBytecode(org.apache.tapestry5.internal.plastic.asm.tree.ClassNode classNode)
public static String toPropertyName(String fieldName)
fieldName
- to convertpublic static String capitalize(String input)
input
- a non-empty stringpublic static Class toClass(ClassLoader loader, String javaName) throws ClassNotFoundException
loader
- class loader to look up injavaName
- java name is Java source format (e.g., "int", "int[]", "java.lang.String", "java.lang.String[]", etc.)ClassNotFoundException
public static Object getFromInstanceContext(InstanceContext context, String javaName)
public static boolean isEqual(Object left, Object right)
public static byte[] readBytecodeForClass(ClassLoader loader, String className, boolean mustExist)
public static org.apache.tapestry5.internal.plastic.asm.tree.ClassNode convertBytecodeToClassNode(byte[] bytecode)
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.