org.jboss.metadata.spi.retrieval
Class MetaDataRetrievalToMetaDataBridge

java.lang.Object
  extended by org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge
All Implemented Interfaces:
MetaData

public class MetaDataRetrievalToMetaDataBridge
extends Object
implements MetaData

MetaDataRetrievalToMetaDataBridge.

Version:
$Revision: 69888 $
Author:
Adrian Brock

Field Summary
 
Fields inherited from interface org.jboss.metadata.spi.MetaData
NO_ANNOTATIONS, NO_METADATA
 
Constructor Summary
MetaDataRetrievalToMetaDataBridge(MetaDataRetrieval retrieval)
          Create a new MetaDataRetrievalToMetaDataBridge.
 
Method Summary
 boolean equals(Object obj)
           
<T extends Annotation>
T
getAnnotation(Class<T> annotationType)
          Get annotation
 Annotation[] getAnnotations()
          Get all the annotations
 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
protected  MetaDataRetrieval getMetaDataRetrieval()
          Get the meta data retrieval
 MetaData getScopeMetaData(ScopeLevel level)
          Get the scope metadata.
 long getValidTime()
          Get the valid time
 int hashCode()
           
 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
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MetaDataRetrievalToMetaDataBridge

public MetaDataRetrievalToMetaDataBridge(MetaDataRetrieval retrieval)
Create a new MetaDataRetrievalToMetaDataBridge.

Parameters:
retrieval - the retrieval
Method Detail

getValidTime

public long getValidTime()
Description copied from interface: MetaData
Get the valid time

Specified by:
getValidTime in interface MetaData
Returns:
the valid time

getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> annotationType)
Description copied from interface: MetaData
Get annotation

Specified by:
getAnnotation in interface MetaData
Type Parameters:
T - the annotation type
Parameters:
annotationType - the annotation type
Returns:
the annotation or null if not present

getAnnotations

public Annotation[] getAnnotations()
Description copied from interface: MetaData
Get all the annotations

Specified by:
getAnnotations in interface MetaData
Returns:
the annotations

getLocalAnnotations

public Annotation[] getLocalAnnotations()
Description copied from interface: MetaData
Get all the local annotations

Specified by:
getLocalAnnotations in interface MetaData
Returns:
the annotations

getMetaData

public Object[] getMetaData()
Description copied from interface: MetaData
Get all the metadata

Specified by:
getMetaData in interface MetaData
Returns:
the metadata

getLocalMetaData

public Object[] getLocalMetaData()
Description copied from interface: MetaData
Get all the local metadata

Specified by:
getLocalMetaData in interface MetaData
Returns:
the metadata

getMetaData

public <T> T getMetaData(Class<T> type)
Description copied from interface: MetaData
Get metadata

Specified by:
getMetaData in interface MetaData
Type Parameters:
T - the metadata type
Parameters:
type - the type
Returns:
the metadata or null if not present

getMetaData

public <T> T getMetaData(String name,
                         Class<T> type)
Description copied from interface: MetaData
Get metadata

Specified by:
getMetaData in interface 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

getMetaData

public Object getMetaData(String name)
Description copied from interface: MetaData
Get metadata

Specified by:
getMetaData in interface MetaData
Parameters:
name - the name of the meta data
Returns:
the metadata or null if not present

isAnnotationPresent

public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
Description copied from interface: MetaData
Is the annotation present?

Specified by:
isAnnotationPresent in interface MetaData
Parameters:
annotationType - the annotation type
Returns:
true when present

isMetaDataPresent

public boolean isMetaDataPresent(Class<?> type)
Description copied from interface: MetaData
Is the metadata present

Specified by:
isMetaDataPresent in interface MetaData
Parameters:
type - the type of the meta data
Returns:
true when the metadata is present

isMetaDataPresent

public boolean isMetaDataPresent(String name,
                                 Class<?> type)
Description copied from interface: MetaData
Is the metadata present

Specified by:
isMetaDataPresent in interface MetaData
Parameters:
name - the name of the meta data
type - the expected type of the metadata
Returns:
true when the metadata is present

isMetaDataPresent

public boolean isMetaDataPresent(String name)
Description copied from interface: MetaData
Is the metadata present

Specified by:
isMetaDataPresent in interface MetaData
Parameters:
name - the name of the meta data
Returns:
true when the metadata is present

getComponentMetaData

public MetaData getComponentMetaData(Signature signature)
Description copied from interface: MetaData
Get the component metadata

Specified by:
getComponentMetaData in interface MetaData
Parameters:
signature - the signature
Returns:
the component metadata

getScopeMetaData

public MetaData getScopeMetaData(ScopeLevel level)
Description copied from interface: MetaData
Get the scope metadata.

Specified by:
getScopeMetaData in interface MetaData
Parameters:
level - the scope level
Returns:
the scope metadata

isEmpty

public boolean isEmpty()
Description copied from interface: MetaData
Is metadata empty.

Specified by:
isEmpty in interface MetaData
Returns:
true if empty

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

getMetaDataRetrieval

protected MetaDataRetrieval getMetaDataRetrieval()
Get the meta data retrieval

Returns:
the retrieval


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