JBoss MetaData Repository 2.2.0.SP1

org.jboss.metadata.spi
Interface MetaData

All Known Implementing Classes:
MetaDataRetrievalToMetaDataBridge

public interface MetaData

MetaData.

Version:
$Revision: 97491 $
Author:
Adrian Brock

Field Summary
static Annotation[] NO_ANNOTATIONS
          No annotations
static Object[] NO_METADATA
          No meta data
 
Method Summary
<T extends Annotation>
T
getAnnotation(Class<T> annotationType)
          Get annotation
 Annotation[] getAnnotations()
          Get all the annotations
 Annotation[] getAnnotationsAnnotatedWith(Class<? extends Annotation> meta)
          Get all the annotations annotated with the given meta annotation
 MetaData getComponentMetaData(Signature signature)
          Get the component metadata
 Annotation[] getLocalAnnotations()
          Get all the local annotations
 Object[] getLocalMetaData()
          Get all the local metadata
 Object[] getMetaData()
          Get all the metadata
<T> T
getMetaData(Class<T> type)
          Get metadata
 Object getMetaData(String name)
          Get metadata
<T> T
getMetaData(String name, Class<T> type)
          Get metadata
 MetaData getScopeMetaData(ScopeLevel level)
          Get the scope metadata.
 long getValidTime()
          Get the valid time
 boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
          Is the annotation present?
 boolean isEmpty()
          Is metadata empty.
 boolean isMetaDataPresent(Class<?> type)
          Is the metadata present
 boolean isMetaDataPresent(String name)
          Is the metadata present
 boolean isMetaDataPresent(String name, Class<?> type)
          Is the metadata present
 

Field Detail

NO_ANNOTATIONS

static final Annotation[] NO_ANNOTATIONS
No annotations


NO_METADATA

static final Object[] NO_METADATA
No meta data

Method Detail

getValidTime

long getValidTime()
Get the valid time

Returns:
the valid time

getAnnotation

<T extends Annotation> T getAnnotation(Class<T> annotationType)
Get annotation

Type Parameters:
T - the annotation type
Parameters:
annotationType - the annotation type
Returns:
the annotation or null if not present

getAnnotations

Annotation[] getAnnotations()
Get all the annotations

Returns:
the annotations

getLocalAnnotations

Annotation[] getLocalAnnotations()
Get all the local annotations

Returns:
the annotations

isAnnotationPresent

boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Is the annotation present?

Parameters:
annotationType - the annotation type
Returns:
true when present

getAnnotationsAnnotatedWith

Annotation[] getAnnotationsAnnotatedWith(Class<? extends Annotation> meta)
Get all the annotations annotated with the given meta annotation

Parameters:
meta - the meta annotation
Returns:
the annotations annotated with the meta annotation

getMetaData

<T> T getMetaData(Class<T> type)
Get metadata

Type Parameters:
T - the metadata type
Parameters:
type - the type
Returns:
the metadata or null if not present

getMetaData

Object[] getMetaData()
Get all the metadata

Returns:
the metadata

getLocalMetaData

Object[] getLocalMetaData()
Get all the local metadata

Returns:
the metadata

isMetaDataPresent

boolean isMetaDataPresent(Class<?> type)
Is the metadata present

Parameters:
type - the type of the meta data
Returns:
true when the metadata is present

getMetaData

Object getMetaData(String name)
Get metadata

Parameters:
name - the name of the meta data
Returns:
the metadata or null if not present

getMetaData

<T> T getMetaData(String name,
                  Class<T> type)
Get metadata

Type Parameters:
T - the metadata type
Parameters:
name - the name of the meta data
type - the expected type of the metadata
Returns:
the metadata or null if not present

isMetaDataPresent

boolean isMetaDataPresent(String name)
Is the metadata present

Parameters:
name - the name of the meta data
Returns:
true when the metadata is present

isMetaDataPresent

boolean isMetaDataPresent(String name,
                          Class<?> type)
Is the metadata present

Parameters:
name - the name of the meta data
type - the expected type of the metadata
Returns:
true when the metadata is present

getComponentMetaData

MetaData getComponentMetaData(Signature signature)
Get the component metadata

Parameters:
signature - the signature
Returns:
the component metadata

getScopeMetaData

MetaData getScopeMetaData(ScopeLevel level)
Get the scope metadata.

Parameters:
level - the scope level
Returns:
the scope metadata

isEmpty

boolean isEmpty()
Is metadata empty.

Returns:
true if empty

JBoss MetaData Repository 2.2.0.SP1

Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.