|
||||||||||
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 | |
---|---|
protected boolean |
canProgress(Class<?> clazz)
Can we progress class param to this type info. |
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 |
isInstance(Object object)
Is object instance of this type info. |
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 classMethod 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 errorpublic Object convertValue(Object value, boolean replaceProperties) throws Throwable
TypeInfo
value
- the original valuereplaceProperties
- whether to replace properties
Throwable
- for any errorpublic 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 TypeInfo
isPrimitive
in class AbstractTypeInfo
public 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
PrimitiveInfo tests for progression
public boolean isInstance(Object object)
TypeInfo
object
- the object to check
object
is an instance of this classPrimitiveInfo tests for progression
protected boolean canProgress(Class<?> clazz)
clazz
- the class to progress
public TypeInfoFactory getTypeInfoFactory()
TypeInfo
public String toString()
toString
in class org.jboss.util.JBossObject
public String toShortString()
toShortString
in interface org.jboss.util.JBossInterface
toShortString
in class org.jboss.util.JBossObject
public boolean equals(Object obj)
equals
in class Object
public 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 |