public final class PrimitiveTypes extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
isPrimitive(String name,
com.sun.codemodel.JCodeModel owner)
Check if a name string refers to a given type.
|
static com.sun.codemodel.JPrimitiveType |
primitiveType(String name,
com.sun.codemodel.JCodeModel owner)
Create a primitive type reference (for code generation) using the given
primitive type name.
|
public static boolean isPrimitive(String name, com.sun.codemodel.JCodeModel owner)
name
- the name of a Java typeowner
- the current code model for type generationtrue
when the given name refers to a primitive Java
type (e.g. "int"), otherwise false
public static com.sun.codemodel.JPrimitiveType primitiveType(String name, com.sun.codemodel.JCodeModel owner)
name
- the name of a primitive Java typeowner
- the current code model for type generationCopyright © 2022. All rights reserved.