Package org.jboss.metadata.spi

Examples of org.jboss.metadata.spi.MetaData


   public <T extends Annotation> T resolveTypedAnnotation(long hash, Method m, Class<T> annotation)
   {
      if (metadata != null)
      {
         MethodSignature signature = new MethodSignature(m.getName(), m.getParameterTypes());
         MetaData methodMD = metadata.getComponentMetaData(signature);
         if (methodMD != null)
         {
            T val = methodMD.getAnnotation(annotation);
            if (val != null) return val;
         }
      }

      if (annotations.isDisabled(m,annotation))
View Full Code Here


   {
      T value = null;
      if (metadata != null)
      {
         FieldSignature signature = new FieldSignature(f);
         MetaData fieldMD = metadata.getComponentMetaData(signature);
         if (fieldMD != null)
         {
            value = fieldMD.getAnnotation(annotation);
            if (value != null) return value;
         }
      }
     
      //MUST call this instead of AR.resolveTypedClassAnnotation since EJB3 overrides AR.resolveClassAnnotation
View Full Code Here

   {
      T value = null;
      if (metadata != null)
      {
         ConstructorSignature signature = new ConstructorSignature(c);
         MetaData conMD = metadata.getComponentMetaData(signature);
         if (conMD != null)
         {
            value = conMD.getAnnotation(annotation);
            if (value != null) return value;
         }
      }
     
      //MUST call this instead of AR.resolveTypedClassAnnotation since EJB3 overrides AR.resolveClassAnnotation
View Full Code Here

   {
      if (metadata != null)
      {
         if (annotation != null)
         {
            MetaData md = metadata.getComponentMetaData(sig);
            if (md != null)
            {
               if (md.isMetaDataPresent(annotation))
                  return true;
            }
         }
      }
      return false;
View Full Code Here

   {
      MutableMetaDataRepository repository = setupEmpty();
      ScopeKey key = new ScopeKey(new Scope(CommonLevels.CLASS, TestClass1.class));
      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(key);
      assertNotNull(retrieval);
      MetaData metaData = new MetaDataRetrievalToMetaDataBridge(retrieval);
      assertNotNull(metaData.getAnnotation(TestAnnotation1.class));
   }
View Full Code Here

   protected abstract MetaData setupConstructorParams();

   public void testFieldEmpty() throws Exception
   {
      MetaData metaData = setupField();
      metaData = metaData.getComponentMetaData(new FieldSignature("empty"));
      testEmpty(metaData);
   }
View Full Code Here

      testEmpty(metaData);
   }
  
   public void testConstructorEmpty() throws Exception
   {
      MetaData metaData = setupConstructor();
      metaData = metaData.getComponentMetaData(new ConstructorSignature());
      testEmpty(metaData);
   }
View Full Code Here

      testEmpty(metaData);
   }
  
   public void testMethodEmpty() throws Exception
   {
      MetaData metaData = setupMethod();
      metaData = metaData.getComponentMetaData(new MethodSignature("empty"));
      testEmpty(metaData);
   }
View Full Code Here

      testEmpty(metaData);
   }
  
   public void testMethodParamsEmpty() throws Exception
   {
      MetaData metaData = setupMethodParams();
      metaData = metaData.getComponentMetaData(new MethodParametersSignature("empty", 0, String.class));
      testEmpty(metaData);
   }
View Full Code Here

      testEmpty(metaData);
   }
     
   public void testConstructorParamsEmpty() throws Exception
   {
      MetaData metaData = setupConstructorParams();
      metaData = metaData.getComponentMetaData(new ConstructorParametersSignature(0, String.class));
      testEmpty(metaData);
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.spi.MetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.