public abstract class AbstractTypeInfo extends org.jboss.util.JBossObject implements TypeInfo
| Constructor and Description |
|---|
AbstractTypeInfo() |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
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.
|
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toShortString, toString, toString, toStringImplementationequals, finalize, getClass, notify, notifyAll, wait, wait, waitconvertValue, convertValue, convertValue, getArrayType, getName, getSimpleName, getType, getTypeInfoFactory, isAssignableFrom, isInstance, newArrayInstancepublic boolean isArray()
TypeInfopublic boolean isCollection()
TypeInfoisCollection in interface TypeInfopublic boolean isMap()
TypeInfopublic boolean isAnnotation()
TypeInfoisAnnotation in interface TypeInfopublic boolean isEnum()
TypeInfopublic boolean isPrimitive()
TypeInfoisPrimitive in interface TypeInfopublic void setAttachment(String name, Object attachment)
TypeInfoIf 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 TypeInfoname - the nameattachment - the attachment, pass null to remove an attachmentpublic <T> T getAttachment(Class<T> expectedType)
TypeInfogetAttachment in interface TypeInfoT - the expected typeexpectedType - the expected typepublic Object getAttachment(String name)
TypeInfogetAttachment in interface TypeInfoname - the nameCopyright © 2016 JBoss by Red Hat. All rights reserved.