Package org.jboss.metadata.spi.signature

Examples of org.jboss.metadata.spi.signature.MethodSignature


            }
            return new AnnotatedElementMetaDataLoader(constructor);
         }
         else if (signature instanceof MethodSignature)
         {
            MethodSignature methodSignature = (MethodSignature) signature;
            Method method = methodSignature.getMethod();
            if (method == null)
               method = SecurityActions.findMethod(clazz, signature.getName(), signature.getParametersTypes(clazz));
            if (method == null)
            {
               if (log.isTraceEnabled())
                  log.trace("Method with signature " + signature + " does not exist on class " + clazz.getName());
               return null;
            }
            return new AnnotatedElementMetaDataLoader(method);
         }
         else if (signature instanceof DeclaredMethodSignature)
         {
            DeclaredMethodSignature methodSignature = (DeclaredMethodSignature) signature;
            Method method = methodSignature.getMethod();
            if (method == null)
            {
               clazz = getDeclaringClass(clazz, methodSignature.getDeclaringClass());
               if (clazz == null)
                  return null;
               method = SecurityActions.findMethod(clazz, signature.getName(), signature.getParametersTypes(clazz));
            }
            if (method == null)
View Full Code Here


   private void getMetaDataMethodAnnotationDependencies(MethodInfo method, MetaData metaData, HashMap<String, ArrayList<String>> dependencies) throws Exception
   {
      if (metaData != null)
      {
         MetaData methodMetaData = metaData.getComponentMetaData(new MethodSignature(method));
         if (methodMetaData != null)
         {
            for (Object annotation : methodMetaData.getAnnotations())
            {
               getDependenciesForMetaDataAnnotation(annotation, dependencies);
View Full Code Here

      return false;
   }
  
   private boolean methodHasAnnotations(MetaData metaData, MethodInfo mi)
   {
      MethodSignature sig = new MethodSignature(mi);
      MetaData methodMD = metaData.getComponentMetaData(sig);

      if (hasMetaDataAtInstanceLevel(methodMD))
      {
         return true;
View Full Code Here

      }
   }
  
   private void addMethodAnnotations(Method m, MemoryMetaDataLoader mutable, Annotation[] extraAnnotations)
   {
      addJoinpointAnnotations(mutable, new MethodSignature(m), m.getName(), m.getAnnotations(), extraAnnotations);
   }
View Full Code Here

   public Object resolveAnnotation(long hash, Method m, Class annotation)
   {
      if (metadata != null)
      {
         MethodSignature signature = new MethodSignature(m.getName(), m.getParameterTypes());
         MetaData methodMD = metadata.getComponentMetaData(signature);
         if (methodMD != null)
         {
            // FIXME The metadata should already include the class annotations
            //       so we should just return this result
View Full Code Here

         {
            if (annotationClass == null)
               annotationClass = Thread.currentThread().getContextClassLoader().loadClass(annotation);
            // FIXME The metadata should already include the class annotations
            //       so we should just return this result
            MethodSignature signature = new MethodSignature(m.getName(), m.getParameterTypes());
            MetaData methodMD = metadata.getComponentMetaData(signature);
            if (methodMD != null)
            {
               if (methodMD.isAnnotationPresent(annotationClass))
                  return true;
View Full Code Here

  
   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;
View Full Code Here

      {
         annotation = annotationClass.getName();
      }
      if (metadata != null)
      {
         if (hasJoinPointAnnotation(m.getDeclaringClass(), new MethodSignature(m), annotation))
         {
            return true;
         }
      }
View Full Code Here

   private void getMetaDataMethodAnnotationDependencies(MethodInfo method, MetaData metaData, HashMap<String, ArrayList<String>> dependencies) throws Exception
   {
      if (metaData != null)
      {
         MetaData methodMetaData = metaData.getComponentMetaData(new MethodSignature(method));
         if (methodMetaData != null)
         {
            for (Object annotation : methodMetaData.getAnnotations())
            {
               getDependenciesForMetaDataAnnotation(annotation, dependencies);
View Full Code Here

      return false;
   }
  
   private boolean methodHasAnnotations(MetaData metaData, MethodInfo mi)
   {
      MethodSignature sig = new MethodSignature(mi);
      MetaData methodMD = metaData.getComponentMetaData(sig);
      if (methodMD != null)
      {
         return methodMD.getAnnotations() != MetaData.NO_ANNOTATIONS;
      }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.spi.signature.MethodSignature

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.