public class ThreadLocalMetaDataLoader extends AbstractMutableMetaDataLoader
| Modifier and Type | Field and Description |
|---|---|
static ThreadLocalMetaDataLoader |
INSTANCE
The singleton instance
|
| Modifier and Type | Method and Description |
|---|---|
<T extends Annotation> |
addAnnotation(T annotation)
Add an annotation
|
<T> T |
addMetaData(String name,
T metaData,
Class<T> type)
Add metaData
|
<T> T |
addMetaData(T metaData,
Class<T> type)
Add metaData
|
void |
clear()
Clear all the values for the current thread
|
ScopeKey |
getScope()
Return the scope key
|
ValidTime |
getValidTime()
The valid time
|
void |
invalidate()
Invalidate
|
<T> boolean |
isCachable(Item<T> item)
Whether the item is cachable
|
boolean |
isEmpty()
Is metadata empty.
|
<T extends Annotation> |
removeAnnotation(Class<T> annotationType)
Remove an annotation
|
<T> T |
removeMetaData(Class<T> type)
Remove metaData
|
<T> T |
removeMetaData(String name,
Class<T> type)
Remove metadata
|
<T extends Annotation> |
retrieveAnnotation(Class<T> annotationType)
Get annotation
|
AnnotationsItem |
retrieveAnnotations()
Get all the annotations
|
AnnotationsItem |
retrieveAnnotationsAnnotatedWith(Class<? extends Annotation> meta)
Get all the annotations annotated with the given meta annotation
|
MetaDatasItem |
retrieveMetaData()
Get all the metadata
|
<T> MetaDataItem<T> |
retrieveMetaData(Class<T> type)
Get metadata
|
MetaDataItem<?> |
retrieveMetaData(String name)
Get metadata
|
checkRestricted, checkRestrictedgetComponentMetaDataRetrievalgetScopedRetrieval, retrieveLocalAnnotations, retrieveLocalMetaDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetComponentMetaDataRetrieval, getScopedRetrieval, retrieveLocalAnnotations, retrieveLocalMetaDatapublic static final ThreadLocalMetaDataLoader INSTANCE
public void clear()
public ScopeKey getScope()
MetaDataRetrievalgetScope in interface MetaDataRetrievalgetScope in class AbstractMetaDataLoaderpublic <T> boolean isCachable(Item<T> item)
MetaDataLoaderisCachable in interface MetaDataLoaderisCachable in class AbstractMetaDataLoaderT - the item typeitem - the itempublic ValidTime getValidTime()
MetaDataRetrievalgetValidTime in interface MetaDataRetrievalgetValidTime in class AbstractMetaDataLoaderpublic void invalidate()
AbstractMetaDataLoaderinvalidate in class AbstractMetaDataLoaderpublic AnnotationsItem retrieveAnnotations()
MetaDataRetrievalpublic <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
MetaDataRetrievalretrieveAnnotation in interface MetaDataRetrievalretrieveAnnotation in class BasicMetaDataLoaderT - the annotation typeannotationType - the annotation typepublic <T extends Annotation> T addAnnotation(T annotation)
MutableMetaDataT - the annotation typeannotation - the annotationpublic <T extends Annotation> T removeAnnotation(Class<T> annotationType)
MutableMetaDataT - the annotation typeannotationType - the annotation typepublic AnnotationsItem retrieveAnnotationsAnnotatedWith(Class<? extends Annotation> meta)
MetaDataRetrievalretrieveAnnotationsAnnotatedWith in interface MetaDataRetrievalretrieveAnnotationsAnnotatedWith in class AbstractMetaDataLoadermeta - the meta annotationpublic MetaDatasItem retrieveMetaData()
MetaDataRetrievalretrieveMetaData in interface MetaDataRetrievalretrieveMetaData in class AbstractMetaDataLoaderpublic <T> MetaDataItem<T> retrieveMetaData(Class<T> type)
MetaDataRetrievalretrieveMetaData in interface MetaDataRetrievalretrieveMetaData in class AbstractMetaDataLoaderT - the metadata typetype - the typepublic MetaDataItem<?> retrieveMetaData(String name)
MetaDataRetrievalretrieveMetaData in interface MetaDataRetrievalretrieveMetaData in class BasicMetaDataLoadername - the name of the meta datapublic <T> T addMetaData(T metaData,
Class<T> type)
MutableMetaDataaddMetaData in interface MutableMetaDataaddMetaData in class AbstractMutableMetaDataLoaderT - the metadata typemetaData - the meta datatype - the expected typepublic <T> T removeMetaData(Class<T> type)
MutableMetaDataremoveMetaData in interface MutableMetaDataremoveMetaData in class AbstractMutableMetaDataLoaderT - the metadata typetype - the meta data typepublic <T> T addMetaData(String name, T metaData, Class<T> type)
MutableMetaDataaddMetaData in interface MutableMetaDataaddMetaData in class AbstractMutableMetaDataLoaderT - the metadata typename - the namemetaData - the meta datatype - the expected typepublic <T> T removeMetaData(String name, Class<T> type)
MutableMetaDataremoveMetaData in interface MutableMetaDataremoveMetaData in class AbstractMutableMetaDataLoaderT - the metadata typename - the name of the meta datatype - the expected type of the metadatapublic boolean isEmpty()
MetaDataRetrievalCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.