|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.util.JBossObject
org.jboss.reflect.spi.AbstractTypeInfo
org.jboss.reflect.spi.PrimitiveInfo
public class PrimitiveInfo
Primitive info TODO JBMICROCONT-118 fix the introspection assumption
| Field Summary | |
|---|---|
static PrimitiveInfo |
BOOLEAN
The boolean info |
static PrimitiveInfo |
BYTE
The byte info |
static PrimitiveInfo |
CHAR
The char info |
static PrimitiveInfo |
DOUBLE
The double info |
static PrimitiveInfo |
FLOAT
The float info |
static PrimitiveInfo |
INT
The int info |
static PrimitiveInfo |
LONG
The long info |
protected String |
name
The name |
protected int |
ordinal
The ordinal |
static PrimitiveInfo |
SHORT
The short info |
protected Class<? extends Object> |
type
The type |
protected static TypeInfoFactory |
typeInfoFactory
The type info factory |
static PrimitiveInfo |
VOID
The void info |
| Fields inherited from class org.jboss.util.JBossObject |
|---|
hashCode, log, toString |
| Constructor Summary | |
|---|---|
protected |
PrimitiveInfo(String name,
int ordinal,
Class<? extends Object> type)
Create a new primitive info |
| Method Summary | |
|---|---|
Object |
convertValue(Object value)
Convert a value |
Object |
convertValue(Object value,
boolean replaceProperties)
Convert a value |
Object |
convertValue(Object value,
boolean replaceProperties,
boolean trim)
Convert a value |
boolean |
equals(Object obj)
|
TypeInfo |
getArrayType()
Get an array type |
String |
getName()
Get the type name |
static Class<?> |
getPrimativeArrayComponentType(String name)
Get the primtive array type class map for a name |
static String |
getPrimativeArrayType(String name)
Get a primtive array type |
static Class<?> |
getPrimativeType(String name)
Get the primtive type for a name |
String |
getSimpleName()
Get the simple name |
Class<?> |
getType()
Deprecated. |
TypeInfoFactory |
getTypeInfoFactory()
Get the TypeInfoFactory that created this type info |
int |
hashCode()
|
boolean |
isAssignableFrom(TypeInfo info)
Mostly using |
boolean |
isPrimitive()
Whether this type is a primitive |
Object |
newArrayInstance(int size)
Create a new array |
int |
ordinal()
Get the ordinal |
String |
toShortString()
|
String |
toString()
|
static PrimitiveInfo |
valueOf(String name)
Get the primitive info for a type |
| Methods inherited from class org.jboss.reflect.spi.AbstractTypeInfo |
|---|
getAttachment, getAttachment, isAnnotation, isArray, isCollection, isEnum, isMap, setAttachment |
| Methods inherited from class org.jboss.util.JBossObject |
|---|
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, list, notEqual, toShortString, toString, toStringImplementation |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final PrimitiveInfo BOOLEAN
public static final PrimitiveInfo BYTE
public static final PrimitiveInfo CHAR
public static final PrimitiveInfo DOUBLE
public static final PrimitiveInfo FLOAT
public static final PrimitiveInfo INT
public static final PrimitiveInfo LONG
public static final PrimitiveInfo SHORT
public static final PrimitiveInfo VOID
protected static final TypeInfoFactory typeInfoFactory
protected final transient String name
protected final int ordinal
protected final transient Class<? extends Object> type
| Constructor Detail |
|---|
protected PrimitiveInfo(String name,
int ordinal,
Class<? extends Object> type)
name - the nameordinal - the oridinaltype - the class| Method Detail |
|---|
public static PrimitiveInfo valueOf(String name)
name - the name
public static String getPrimativeArrayType(String name)
name - the primtive type name
public static Class<?> getPrimativeType(String name)
name - the primtive type name
public static Class<?> getPrimativeArrayComponentType(String name)
name - the array type name
public int ordinal()
public String getName()
TypeInfo
public String getSimpleName()
TypeInfo
@Deprecated public Class<?> getType()
TypeInfo
public Object convertValue(Object value)
throws Throwable
TypeInfo
value - the original value
Throwable - for any error
public Object convertValue(Object value,
boolean replaceProperties)
throws Throwable
TypeInfo
value - the original valuereplaceProperties - whether to replace properties
Throwable - for any error
public Object convertValue(Object value,
boolean replaceProperties,
boolean trim)
throws Throwable
TypeInfo
value - the original valuereplaceProperties - whether to replace propertiestrim - do we trim before conversion
Throwable - for any errorpublic boolean isPrimitive()
TypeInfo
isPrimitive in interface TypeInfoisPrimitive in class AbstractTypeInfopublic TypeInfo getArrayType()
TypeInfo
public Object newArrayInstance(int size)
throws Throwable
TypeInfo
size - the size
Throwable - for any errorpublic boolean isAssignableFrom(TypeInfo info)
TypeInfo
info - type info
NumberInfo tests for progressionpublic TypeInfoFactory getTypeInfoFactory()
TypeInfo
public String toString()
toString in class org.jboss.util.JBossObjectpublic String toShortString()
toShortString in interface org.jboss.util.JBossInterfacetoShortString in class org.jboss.util.JBossObjectpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class org.jboss.util.JBossObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||