Package org.jboss.metadata.spi.signature

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


   {
      if (method == null)
         return;
     
      visitedMethods.add(method);
      Signature sis = new MethodSignature(method);
      MetaData cmdr = retrieval.getComponentMetaData(sis);
      if (cmdr != null)
      {
         for(T plugin : getPlugins(ElementType.METHOD, PROPERTY_FILTER, annotationClasses))
         {
View Full Code Here


    * @param annotations the actual annotations
    * @param resource the resource we're visiting
    */
   protected void handleAnnotations(ElementType type, CtMember member, Object[] annotations, ResourceContext resource)
   {
      Signature signature = null;
      if (member != null)
         signature = JavassistSignatureFactory.getSignature(member);
      handleAnnotations(type, signature, annotations, resource);
   }
View Full Code Here

    * @param annotations the actual annotations
    * @param resource the resource we're visiting
    */
   protected void handleAnnotations(ElementType type, CtMember member, Object[] annotations, ResourceContext resource)
   {
      Signature signature = null;
      if (member != null)
         signature = JavassistSignatureFactory.getSignature(member);
      handleAnnotations(type, signature, annotations, resource);
   }
View Full Code Here

      Set<ConstructorInfo> constructors = info.getConstructors();
      if (constructors != null && constructors.isEmpty() == false)
      {
         for(ConstructorInfo ci : constructors)
         {
            Signature cis = new ConstructorSignature(Configurator.getParameterTypes(trace, ci.getParameterTypes()));
            MetaData cmdr = retrieval.getComponentMetaData(cis);
            if (cmdr != null)
            {
               for(AnnotationPlugin plugin : constructorAnnotationPlugins)
               {
                  if (isApplyPhase)
                     plugin.applyAnnotation(ci, cmdr, visitor);
                  else
                     plugin.cleanAnnotation(ci, cmdr, visitor);
               }
            }
            else if (trace)
               log.trace("No annotations for " + ci);
         }
      }
      else if (trace)
         log.trace("No constructors");

      // properties
      Set<MethodInfo> visitedMethods = new HashSet<MethodInfo>();
      Set<PropertyInfo> properties = info.getProperties();
      if (properties != null && properties.isEmpty() == false)
      {
         for(PropertyInfo pi : properties)
         {
            MethodInfo setter = pi.getSetter();
            FieldInfo field = pi.getFieldInfo();

            if (setter != null)
            {
               visitedMethods.add(setter);
               Signature sis = new MethodSignature(setter);
               MetaData cmdr = retrieval.getComponentMetaData(sis);
               if (cmdr != null)
               {
                  for(AnnotationPlugin plugin : propertyAnnotationPlugins)
                  {
                     if (isApplyPhase)
                        plugin.applyAnnotation(pi, cmdr, visitor);
                     else
                        plugin.cleanAnnotation(pi, cmdr, visitor);
                  }
               }
               else if (trace)
                  log.trace("No annotations for property " + pi.getName());
            }
            else if (field != null)
            {
               Signature sis = new FieldSignature(field);
               MetaData cmdr = retrieval.getComponentMetaData(sis);
               if (cmdr != null)
               {
                  for(AnnotationPlugin plugin : fieldAnnotationPlugins)
                  {
                     if (isApplyPhase)
                        plugin.applyAnnotation(field, cmdr, visitor);
                     else
                        plugin.cleanAnnotation(field, cmdr, visitor);
                  }
               }
               else if (trace)
                  log.trace("No annotations for field " + field.getName());
            }
         }
      }
      else if (trace)
         log.trace("No properties");

      // methods
      Set<MethodInfo> methods = info.getMethods();
      if (methods != null && methods.isEmpty() == false)
      {
         for(MethodInfo mi : methods)
         {
            if (visitedMethods.contains(mi) == false)
            {
               Signature mis = new MethodSignature(mi);
               MetaData cmdr = retrieval.getComponentMetaData(mis);
               if (cmdr != null)
               {
                  for(AnnotationPlugin plugin : methodAnnotationPlugins)
                  {
                     if (isApplyPhase)
                        plugin.applyAnnotation(mi, cmdr, visitor);
                     else
                        plugin.cleanAnnotation(mi, cmdr, visitor);
                  }
               }
               else if (trace)
                  log.trace("No annotations for " + mi);
            }
         }
      }
      else if (trace)
         log.trace("No methods");

      // static methods
      MethodInfo[] staticMethods = classInfo.getDeclaredMethods();
      if (staticMethods != null && staticMethods.length != 0)
      {
         for(MethodInfo smi : staticMethods)
         {
            if (smi.isStatic() && smi.isPublic())
            {
               Signature mis = new MethodSignature(smi);
               MetaData cmdr = retrieval.getComponentMetaData(mis);
               if (cmdr != null)
               {
                  for(AnnotationPlugin plugin : methodAnnotationPlugins)
                  {
View Full Code Here

      List<ParameterMetaData> pmds = new ArrayList<ParameterMetaData>();
      for(int i=0; i < parameters.length; i++)
      {
         ParameterInfo pi = parameters[i];
         Signature pis = new MethodParametersSignature(
               pi.getName(),
               Configurator.getParameterTypes(log.isTraceEnabled(), typeInfos),
               i
         );
         MetaData mdr = retrieval.getComponentMetaData(pis);
View Full Code Here

   {
      Map<Method, Signature> methodSignatures = new HashMap<Method, Signature>();
     
      Signature getSignature(Method m)
      {
         Signature s = methodSignatures.get(m);
         if (s == null)
         {
            s = new DeclaredMethodSignature(m);
            methodSignatures.put(m, s);
         }
View Full Code Here

   {
      Map<Method, Signature> methodSignatures = new HashMap<Method, Signature>();
     
      Signature getSignature(Method m)
      {
         Signature s = methodSignatures.get(m);
         if (s == null)
         {
            s = new DeclaredMethodSignature(m);
            methodSignatures.put(m, s);
         }
View Full Code Here

/*     */     }
/* 189 */     List pmds = new ArrayList();
/* 190 */     for (int i = 0; i < parameters.length; i++)
/*     */     {
/* 192 */       ParameterInfo pi = parameters[i];
/* 193 */       Signature pis = new MethodParametersSignature(pi.getName(), Configurator.getParameterTypes(this.log.isTraceEnabled(), typeInfos), i);
/*     */
/* 198 */       MetaData mdr = retrieval.getComponentMetaData(pis);
/* 199 */       if (mdr != null)
/*     */       {
/* 201 */         ValueMetaData value = null;
View Full Code Here

/* 155 */     Set constructors = info.getConstructors();
/* 156 */     if ((constructors != null) && (!constructors.isEmpty()))
/*     */     {
/* 158 */       for (ConstructorInfo ci : constructors)
/*     */       {
/* 160 */         Signature cis = new ConstructorSignature(Configurator.getParameterTypes(trace, ci.getParameterTypes()));
/* 161 */         MetaData cmdr = retrieval.getComponentMetaData(cis);
/* 162 */         if (cmdr != null)
/*     */         {
/* 164 */           for (AnnotationPlugin plugin : this.constructorAnnotationPlugins)
/*     */           {
/* 166 */             if (isApplyPhase)
/* 167 */               plugin.applyAnnotation(ci, cmdr, visitor);
/*     */             else
/* 169 */               plugin.cleanAnnotation(ci, cmdr, visitor);
/*     */           }
/*     */         }
/* 172 */         else if (trace)
/* 173 */           this.log.trace("No annotations for " + ci);
/*     */       }
/*     */     }
/* 176 */     else if (trace) {
/* 177 */       this.log.trace("No constructors");
/*     */     }
/*     */
/* 180 */     Set visitedMethods = new HashSet();
/* 181 */     Set properties = info.getProperties();
/* 182 */     if ((properties != null) && (!properties.isEmpty()))
/*     */     {
/* 184 */       for (PropertyInfo pi : properties)
/*     */       {
/* 186 */         MethodInfo setter = pi.getSetter();
/* 187 */         if (setter != null)
/*     */         {
/* 189 */           visitedMethods.add(setter);
/* 190 */           Signature sis = new MethodSignature(setter);
/* 191 */           MetaData cmdr = retrieval.getComponentMetaData(sis);
/* 192 */           if (cmdr != null)
/*     */           {
/* 194 */             for (AnnotationPlugin plugin : this.propertyAnnotationPlugins)
/*     */             {
/* 196 */               if (isApplyPhase)
/* 197 */                 plugin.applyAnnotation(pi, cmdr, visitor);
/*     */               else
/* 199 */                 plugin.cleanAnnotation(pi, cmdr, visitor);
/*     */             }
/*     */           }
/* 202 */           else if (trace)
/* 203 */             this.log.trace("No annotations for property " + pi.getName());
/*     */         }
/*     */       }
/*     */     }
/* 207 */     else if (trace) {
/* 208 */       this.log.trace("No properties");
/*     */     }
/*     */
/* 211 */     Set methods = info.getMethods();
/* 212 */     if ((methods != null) && (!methods.isEmpty()))
/*     */     {
/* 214 */       for (MethodInfo mi : methods)
/*     */       {
/* 216 */         if (!visitedMethods.contains(mi))
/*     */         {
/* 218 */           Signature mis = new MethodSignature(mi);
/* 219 */           MetaData cmdr = retrieval.getComponentMetaData(mis);
/* 220 */           if (cmdr != null)
/*     */           {
/* 222 */             for (AnnotationPlugin plugin : this.methodAnnotationPlugins)
/*     */             {
/* 224 */               if (isApplyPhase)
/* 225 */                 plugin.applyAnnotation(mi, cmdr, visitor);
/*     */               else
/* 227 */                 plugin.cleanAnnotation(mi, cmdr, visitor);
/*     */             }
/*     */           }
/* 230 */           else if (trace)
/* 231 */             this.log.trace("No annotations for " + mi);
/*     */         }
/*     */       }
/*     */     }
/* 235 */     else if (trace) {
/* 236 */       this.log.trace("No methods");
/*     */     }
/*     */
/* 239 */     MethodInfo[] staticMethods = classInfo.getDeclaredMethods();
/* 240 */     if ((staticMethods != null) && (staticMethods.length != 0))
/*     */     {
/* 242 */       for (MethodInfo smi : staticMethods)
/*     */       {
/* 244 */         if ((!smi.isStatic()) || (!smi.isPublic()))
/*     */           continue;
/* 246 */         Signature mis = new MethodSignature(smi);
/* 247 */         MetaData cmdr = retrieval.getComponentMetaData(mis);
/* 248 */         if (cmdr != null)
/*     */         {
/* 250 */           for (AnnotationPlugin plugin : this.methodAnnotationPlugins)
/*     */           {
/* 252 */             if (isApplyPhase)
/* 253 */               plugin.applyAnnotation(smi, cmdr, visitor);
/*     */             else
/* 255 */               plugin.cleanAnnotation(smi, cmdr, visitor);
/*     */           }
/*     */         }
/* 258 */         else if (trace) {
/* 259 */           this.log.trace("No annotations for " + smi);
/*     */         }
/*     */       }
/*     */     }
/* 263 */     else if (trace) {
/* 264 */       this.log.trace("No static methods");
/*     */     }
/*     */
/* 267 */     FieldInfo[] fields = classInfo.getDeclaredFields();
/* 268 */     if ((fields != null) && (fields.length > 0))
/*     */     {
/* 270 */       for (FieldInfo fi : fields)
/*     */       {
/* 272 */         Signature fis = new FieldSignature(fi.getName());
/* 273 */         MetaData cmdr = retrieval.getComponentMetaData(fis);
/* 274 */         if (cmdr != null)
/*     */         {
/* 276 */           for (AnnotationPlugin plugin : this.fieldAnnotationPlugins)
/*     */           {
View Full Code Here

      List<ParameterMetaData> pmds = new ArrayList<ParameterMetaData>();
      for(int i=0; i < parameters.length; i++)
      {
         ParameterInfo pi = parameters[i];
         Signature pis = new MethodParametersSignature(
               pi.getName(),
               Configurator.getParameterTypes(log.isTraceEnabled(), typeInfos),
               i
         );
         MetaData mdr = retrieval.getComponentMetaData(pis);
View Full Code Here

TOP

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

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.