# Class: com.pnfsoftware.jeb.util.base.JavaUtil

A collection of primitives relative to the Java language itself.

## Static Method: extractFullName
- parameter: `internalClassname`, type: `java.lang.String`
- parameter: `validate`, type: `boolean`
- return type: `java.lang.String`

Description: Extract the dot\-separated class name from an internal class name.
parameter: internalClassname: internal class name, such as `Ljava/lang/String;`
parameter: validate: true to validate each name element as a Java identifier
return: dot\-separated class name, or null if the input is invalid

## Static Method: extractSimpleName
- parameter: `internalClassname`, type: `java.lang.String`
- parameter: `validate`, type: `boolean`
- return type: `java.lang.String`

Description: Extract the simple class name from an internal class name.
parameter: internalClassname: internal class name, such as `Ljava/lang/String;`
parameter: validate: true to validate each name element as a Java identifier
return: simple class name, or null if the input is invalid

## Static Method: isClassname
- parameter: `s`, type: `java.lang.String`
- parameter: `validate`, type: `boolean`
- parameter: `elements`, type: `java.util.List<java.lang.String>`
- return type: `boolean`

Description: Validate or parse a dot\-separated class name.
parameter: s: dot\-separated class name
parameter: validate: true to validate each name element as a Java identifier
parameter: elements: optional output list receiving the name elements
return: true if the string is a class name

## Static Method: isInternalClassname
- parameter: `s`, type: `java.lang.String`
- parameter: `validate`, type: `boolean`
- parameter: `elements`, type: `java.util.List<java.lang.String>`
- return type: `boolean`

Description: Validate or parse an internal class name.
parameter: s: internal class name, such as `Ljava/lang/String;`
parameter: validate: true to validate each name element as a Java identifier
parameter: elements: optional output list receiving the slash\-separated name elements
return: true if the string is an internal class name

## Static Method: isKeyword
- parameter: `s`, type: `java.lang.String`
- return type: `boolean`

Description: Determine whether a string is a Java keyword.
parameter: s: string to test
return: true if the string is a Java keyword

## Static Method: isReservedLiteral
- parameter: `s`, type: `java.lang.String`
- return type: `boolean`

Description: Determine whether a string is a Java keyword or a reserved literal.
parameter: s: string to test
return: true if the string is a keyword, `null`, `true`, or `false`

## Static Method: isReservedMethodName
- parameter: `name`, type: `java.lang.String`
- return type: `boolean`

Description: Determine whether a method name is reserved by the JVM.
parameter: name: method name
return: true for `<init>` and `<clinit>`

## Static Method: isValidClassname
- parameter: `s`, type: `java.lang.String`
- parameter: `elements`, type: `java.util.List<java.lang.String>`
- return type: `boolean`

Description: Validate a class name in standard binary form.
parameter: s: dot\-separated class name
parameter: elements: optional output list receiving the name elements
return: true if the string is a valid class name

## Static Method: isValidClassname
- parameter: `s`, type: `java.lang.String`
- return type: `boolean`

Description: Validate a class name in standard binary form.
parameter: s: dot\-separated class name
return: true if the string is a valid class name

## Static Method: isValidIdentifierName
- parameter: `s`, type: `java.lang.String`
- return type: `boolean`

Description: Validate a Java identifier.
parameter: s: identifier to validate
return: true if the string is a valid Java identifier and not a reserved literal

## Static Method: isValidInternalClassname
- parameter: `s`, type: `java.lang.String`
- parameter: `elements`, type: `java.util.List<java.lang.String>`
- return type: `boolean`

Description: Validate an internal class name and optionally collect its elements.
parameter: s: internal class name
parameter: elements: optional output list receiving the name elements
return: true if the string is a valid internal class name

## Static Method: isValidInternalClassname
- parameter: `s`, type: `java.lang.String`
- return type: `boolean`

Description: Validate an internal class name.
parameter: s: internal class name
return: true if the string is a valid internal class name

## Static Method: letterToPrimitive
- parameter: `letterType`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Convert a JVM descriptor letter to its Java primitive type name.
parameter: letterType: descriptor letter
return: primitive type name, or null if the input is not a primitive descriptor

## Static Method: primitiveToLetter
- parameter: `primitiveType`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Convert a Java primitive type name to its JVM descriptor letter.
parameter: primitiveType: primitive type name
return: descriptor letter, or null if the input is not a primitive type

## Static Method: primitiveToWrapper
- parameter: `primitiveType`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Convert a Java primitive type name to its wrapper internal class name.
parameter: primitiveType: primitive type name
return: wrapper internal class name, or null if the input is not a primitive type

## Static Method: toJvmName
- parameter: `javaname`, type: `java.lang.String`
- return type: `java.lang.String`

Description: 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;
 
```
parameter: javaname: name returned by Java's `Class.getName(...)`
return: JVM internal name or descriptor

## Static Method: toJvmName
- parameter: `c`, type: `java.lang.Class<?>`
- return type: `java.lang.String`

Description: 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;
 
```
parameter: c: a java class reference
return: JVM internal name or descriptor

## Static Method: wrapperToPrimitive
- parameter: `wrapperType`, type: `java.lang.String`
- return type: `java.lang.String`

Description: Convert a wrapper internal class name to its Java primitive type name.
parameter: wrapperType: wrapper internal class name
return: primitive type name, or null if the input is not a primitive wrapper

