public class

JavaUtil

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.base.JavaUtil

Class Overview

A collection of primitives relative to the Java language itself.

Summary

Public Constructors
JavaUtil()
Public Methods
static String extractFullName(String internalClassname, boolean validate)
static String extractSimpleName(String internalClassname, boolean validate)
static boolean isClassname(String s, boolean validate, List<String> elements)
static boolean isInternalClassname(String s, boolean validate, List<String> elements)
static boolean isKeyword(String s)
static boolean isReservedLiteral(String s)
static boolean isReservedMethodName(String name)
static boolean isValidClassname(String s)
static boolean isValidClassname(String s, List<String> elements)
Validate a class name in standard binary form.
static boolean isValidIdentifierName(String s)
static boolean isValidInternalClassname(String s)
static boolean isValidInternalClassname(String s, List<String> elements)
static String letterToPrimitive(String letterType)
static String primitiveToLetter(String primitiveType)
static String primitiveToWrapper(String primitiveType)
static String toJvmName(Class<?> c)
Generate the internal binary name (jvm name) for the provided type name, as provided by Class.getName().
static String toJvmName(String javaname)
Generate the internal binary name (jvm name) for the provided type name, as provided by Class.getName().
static String wrapperToPrimitive(String wrapperType)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JavaUtil ()

Public Methods

public static String extractFullName (String internalClassname, boolean validate)

public static String extractSimpleName (String internalClassname, boolean validate)

public static boolean isClassname (String s, boolean validate, List<String> elements)

public static boolean isInternalClassname (String s, boolean validate, List<String> elements)

public static boolean isKeyword (String s)

public static boolean isReservedLiteral (String s)

public static boolean isReservedMethodName (String name)

public static boolean isValidClassname (String s)

public static boolean isValidClassname (String s, List<String> elements)

Validate a class name in standard binary form.

Parameters
s dot-separated class name

public static boolean isValidIdentifierName (String s)

public static boolean isValidInternalClassname (String s)

public static boolean isValidInternalClassname (String s, List<String> elements)

public static String letterToPrimitive (String letterType)

public static String primitiveToLetter (String primitiveType)

public static String primitiveToWrapper (String primitiveType)

public static String toJvmName (Class<?> c)

Generate the internal binary name (jvm name) for the provided type name, as provided by Class.getName().

Class.getName() uses inconsistent format. Example:

 int                      -> int
 int[]                    -> [I
 int[][]                  -> [[I
 java.lang.Integer        -> java.lang.Integer
 java.lang.Integer[]      -> [Ljava.lang.Integer;
 java.lang.Integer[][]    -> [Ljava.lang.Integer;
 

Parameters
c a java class reference

public static String toJvmName (String javaname)

Generate the internal binary name (jvm name) for the provided type name, as provided by Class.getName().

Class.getName() uses inconsistent format. Example:

 int                      -> int
 int[]                    -> [I
 int[][]                  -> [[I
 java.lang.Integer        -> java.lang.Integer
 java.lang.Integer[]      -> [Ljava.lang.Integer;
 java.lang.Integer[][]    -> [Ljava.lang.Integer;
 

Parameters
javaname name returned by Java's Class.getName(...)

public static String wrapperToPrimitive (String wrapperType)