|
||||||||||
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
public abstract class AbstractTypeInfo
AbstractTypeInfo.
Field Summary |
---|
Fields inherited from class org.jboss.util.JBossObject |
---|
hashCode, log, toString |
Constructor Summary | |
---|---|
AbstractTypeInfo()
|
Method Summary | ||
---|---|---|
|
getAttachment(Class<T> expectedType)
Get an attachment from the type, uses the expected type as both the name and to cast the resulting object. |
|
Object |
getAttachment(String name)
Get an attachment from the type |
|
boolean |
isAnnotation()
Whether this type is an annotation |
|
boolean |
isArray()
Whether this type is an array |
|
boolean |
isCollection()
Whether this type is a collection |
|
boolean |
isEnum()
Whether this type is an enum |
|
boolean |
isMap()
Whether this type is a map |
|
boolean |
isPrimitive()
Whether this type is a primitive |
|
void |
setAttachment(String name,
Object attachment)
Set an attachment against the type. |
Methods inherited from class org.jboss.util.JBossObject |
---|
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementation |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.reflect.spi.TypeInfo |
---|
convertValue, convertValue, convertValue, getArrayType, getName, getSimpleName, getType, getTypeInfoFactory, isAssignableFrom, isInstance, newArrayInstance |
Constructor Detail |
---|
public AbstractTypeInfo()
Method Detail |
---|
public boolean isArray()
TypeInfo
isArray
in interface TypeInfo
public boolean isCollection()
TypeInfo
isCollection
in interface TypeInfo
public boolean isMap()
TypeInfo
isMap
in interface TypeInfo
public boolean isAnnotation()
TypeInfo
isAnnotation
in interface TypeInfo
public boolean isEnum()
TypeInfo
isEnum
in interface TypeInfo
public boolean isPrimitive()
TypeInfo
isPrimitive
in interface TypeInfo
public void setAttachment(String name, Object attachment)
TypeInfo
If you add a future object, subsequent gets will wait for the result
WARNING: Be careful about what you put in here. Don't create references across classloaders, if you are not sure add a WeakReference to the information.
setAttachment
in interface TypeInfo
name
- the nameattachment
- the attachment, pass null to remove an attachmentpublic <T> T getAttachment(Class<T> expectedType)
TypeInfo
getAttachment
in interface TypeInfo
T
- the expected typeexpectedType
- the expected type
public Object getAttachment(String name)
TypeInfo
getAttachment
in interface TypeInfo
name
- the name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |