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, checkRestricted
getComponentMetaDataRetrieval
getScopedRetrieval, retrieveLocalAnnotations, retrieveLocalMetaData
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getComponentMetaDataRetrieval, getScopedRetrieval, retrieveLocalAnnotations, retrieveLocalMetaData
public static final ThreadLocalMetaDataLoader INSTANCE
public void clear()
public ScopeKey getScope()
MetaDataRetrieval
getScope
in interface MetaDataRetrieval
getScope
in class AbstractMetaDataLoader
public <T> boolean isCachable(Item<T> item)
MetaDataLoader
isCachable
in interface MetaDataLoader
isCachable
in class AbstractMetaDataLoader
T
- the item typeitem
- the itempublic ValidTime getValidTime()
MetaDataRetrieval
getValidTime
in interface MetaDataRetrieval
getValidTime
in class AbstractMetaDataLoader
public void invalidate()
AbstractMetaDataLoader
invalidate
in class AbstractMetaDataLoader
public AnnotationsItem retrieveAnnotations()
MetaDataRetrieval
public <T extends Annotation> AnnotationItem<T> retrieveAnnotation(Class<T> annotationType)
MetaDataRetrieval
retrieveAnnotation
in interface MetaDataRetrieval
retrieveAnnotation
in class BasicMetaDataLoader
T
- the annotation typeannotationType
- the annotation typepublic <T extends Annotation> T addAnnotation(T annotation)
MutableMetaData
T
- the annotation typeannotation
- the annotationpublic <T extends Annotation> T removeAnnotation(Class<T> annotationType)
MutableMetaData
T
- the annotation typeannotationType
- the annotation typepublic AnnotationsItem retrieveAnnotationsAnnotatedWith(Class<? extends Annotation> meta)
MetaDataRetrieval
retrieveAnnotationsAnnotatedWith
in interface MetaDataRetrieval
retrieveAnnotationsAnnotatedWith
in class AbstractMetaDataLoader
meta
- the meta annotationpublic MetaDatasItem retrieveMetaData()
MetaDataRetrieval
retrieveMetaData
in interface MetaDataRetrieval
retrieveMetaData
in class AbstractMetaDataLoader
public <T> MetaDataItem<T> retrieveMetaData(Class<T> type)
MetaDataRetrieval
retrieveMetaData
in interface MetaDataRetrieval
retrieveMetaData
in class AbstractMetaDataLoader
T
- the metadata typetype
- the typepublic MetaDataItem<?> retrieveMetaData(String name)
MetaDataRetrieval
retrieveMetaData
in interface MetaDataRetrieval
retrieveMetaData
in class BasicMetaDataLoader
name
- the name of the meta datapublic <T> T addMetaData(T metaData, Class<T> type)
MutableMetaData
addMetaData
in interface MutableMetaData
addMetaData
in class AbstractMutableMetaDataLoader
T
- the metadata typemetaData
- the meta datatype
- the expected typepublic <T> T removeMetaData(Class<T> type)
MutableMetaData
removeMetaData
in interface MutableMetaData
removeMetaData
in class AbstractMutableMetaDataLoader
T
- the metadata typetype
- the meta data typepublic <T> T addMetaData(String name, T metaData, Class<T> type)
MutableMetaData
addMetaData
in interface MutableMetaData
addMetaData
in class AbstractMutableMetaDataLoader
T
- the metadata typename
- the namemetaData
- the meta datatype
- the expected typepublic <T> T removeMetaData(String name, Class<T> type)
MutableMetaData
removeMetaData
in interface MutableMetaData
removeMetaData
in class AbstractMutableMetaDataLoader
T
- the metadata typename
- the name of the meta datatype
- the expected type of the metadatapublic boolean isEmpty()
MetaDataRetrieval
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.