1 22 package org.jboss.metadata.spi.retrieval.helper; 23 24 import org.jboss.metadata.spi.retrieval.AnnotationsItem; 25 import org.jboss.metadata.spi.retrieval.MetaDataItem; 26 import org.jboss.metadata.spi.retrieval.MetaDatasItem; 27 28 34 public class AnnotationsToMetaDatasBridge implements MetaDatasItem 35 { 36 37 private AnnotationsItem annotations; 38 39 44 public AnnotationsToMetaDatasBridge(AnnotationsItem annotations) 45 { 46 if (annotations == null) 47 throw new IllegalArgumentException ("Null annotations"); 48 this.annotations = annotations; 49 } 50 51 public boolean isCachable() 52 { 53 return annotations.isCachable(); 54 } 55 56 public boolean isValid() 57 { 58 return annotations.isValid(); 59 } 60 61 @SuppressWarnings ("unchecked") 62 public Object [] getValue() 63 { 64 return annotations.getValue(); 65 } 66 67 public MetaDataItem[] getMetaDatas() 68 { 69 return annotations.getAnnotations(); 70 } 71 } 72 | Popular Tags |