Class PlasticInternalUtils
-
- org.apache.tapestry5.internal.plastic.PlasticInternalUtils
-
public class PlasticInternalUtils extends
-
-
Field Summary
Fields Modifier and Type Field Description static []
EMPTY
-
Constructor Summary
Constructors Constructor Description PlasticInternalUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static
input)
Capitalizes the input string, converting the first character to upper case.static void
closeable)
static org.apache.tapestry5.internal.plastic.asm.tree.ClassNode
convertBytecodeToClassNode(byte[] bytecode)
static
dissasembleBytecode(org.apache.tapestry5.internal.plastic.asm.tree.ClassNode classNode)
static
getFromInstanceContext(InstanceContext context, javaName)
static boolean
input)
static boolean
[] input)
static boolean
left, right)
Returns true if both objects are the same instance, or both null, or left equals right.static boolean
input)
static <K,V>
<K,V>newConcurrentMap()
static <T> <T>
newList()
static <K,V>
<K,V>newMap()
static <T> <T>
newSet()
static
descriptor)
Converts an object type descriptor (i.e.static []
[] input)
static byte[]
loader, className, boolean mustExist)
static
loader, javaName)
static
internalName)
Converts a class's internal name (i.e., using slashes) to Java source code format (i.e., using periods).static
className)
static
className)
Converts a primitive type or fully qualified class name (or array form) to a descriptor.static
className)
static
t)
static MethodDescription
toMethodDescription(org.apache.tapestry5.internal.plastic.asm.tree.MethodNode node)
static
fieldName)
Strips out leading and trailing underscores, leaving the real property name.
-
-
-
Field Detail
-
EMPTY
public static final [] EMPTY
-
-
Constructor Detail
-
PlasticInternalUtils
public PlasticInternalUtils()
-
-
Method Detail
-
isEmpty
public static boolean [] input)
-
orEmpty
public static [] [] input)
-
isBlank
public static boolean input)
-
isNonBlank
public static boolean input)
-
toInternalName
public static className)
-
toClassPath
public static className)
-
toMessage
public static t)
-
close
public static void closeable)
-
toMethodDescription
public static MethodDescription toMethodDescription(org.apache.tapestry5.internal.plastic.asm.tree.MethodNode node)
-
toClassName
public static internalName)
Converts a class's internal name (i.e., using slashes) to Java source code format (i.e., using periods).
-
toDescriptor
public static className)
Converts a primitive type or fully qualified class name (or array form) to a descriptor.- boolean --> Z
- java.lang.Integer --> Ljava/lang/Integer;
- char[] --> [C
- java.lang.String[][] --> [[java/lang/String;
-
objectDescriptorToClassName
public static descriptor)
Converts an object type descriptor (i.e. "Ljava/lang/Object;") to a class name ("java.lang.Object").
-
newMap
public static <K,V> <K,V> newMap()
-
newConcurrentMap
public static <K,V> <K,V> newConcurrentMap()
-
newSet
public static <T> <T> newSet()
-
newList
public static <T> <T> newList()
-
dissasembleBytecode
public static dissasembleBytecode(org.apache.tapestry5.internal.plastic.asm.tree.ClassNode classNode)
-
toPropertyName
public static fieldName)
Strips out leading and trailing underscores, leaving the real property name. In addition, "m_foo" is converted to "foo".- Parameters:
fieldName
- to convert- Returns:
- the property name
-
capitalize
public static input)
Capitalizes the input string, converting the first character to upper case.- Parameters:
input
- a non-empty string- Returns:
- the same string if already capitalized, or a capitalized version
-
toClass
public static loader, javaName) throws
- Parameters:
loader
- class loader to look up injavaName
- java name is Java source format (e.g., "int", "int[]", "java.lang.String", "java.lang.String[]", etc.)- Returns:
- class instance
- Throws:
-
getFromInstanceContext
public static getFromInstanceContext(InstanceContext context, javaName)
-
isEqual
public static boolean left, right)
Returns true if both objects are the same instance, or both null, or left equals right.
-
readBytecodeForClass
public static byte[] loader, className, boolean mustExist)
-
convertBytecodeToClassNode
public static org.apache.tapestry5.internal.plastic.asm.tree.ClassNode convertBytecodeToClassNode(byte[] bytecode)
-
-