Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.FieldInfo


   {
      if (this == obj) return true;
      if (obj == null || obj instanceof FieldInfo == false)
         return false;

      final FieldInfo other = (FieldInfo) obj;

      if (name.equals(other.getName()) == false)
         return false;
      return declaringClass.equals(other.getDeclaringClass());
   }
View Full Code Here


      if (obj == this)
         return true;
      if (obj == null || obj instanceof FieldInfo == false)
         return false;
     
      FieldInfo other = (FieldInfo) obj;
      if (getName().equals(other.getName()) == false)
         return false;
      return getDeclaringClass().equals(other.getDeclaringClass());
   }
View Full Code Here

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

         addAnnotations(classloader, mutable, methodInfo, propertyAnnotations);
      methodInfo = propertyInfo.getSetter();
      if (methodInfo != null)
         addAnnotations(classloader, mutable, methodInfo, propertyAnnotations);
      // field annotations
      FieldInfo fieldInfo = propertyInfo.getFieldInfo();
      if (fieldInfo != null)
         addAnnotations(classloader, mutable, fieldInfo, propertyAnnotations);
   }
View Full Code Here

   {
      boolean trace = log.isTraceEnabled();
      if (trace)
         log.trace("Get field get Joinpoint jpf=" + jpf + " target=" + object + " name=" + name);

      FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name);
      FieldGetJoinpoint joinpoint = jpf.getFieldGetJoinpoint(fieldInfo);
      joinpoint.setTarget(object);
      return joinpoint;
   }
View Full Code Here

   {
      boolean trace = log.isTraceEnabled();
      if (trace)
         log.trace("Get field set Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " value=" + value);

      FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name);
      FieldSetJoinpoint joinpoint = jpf.getFieldSetJoinpoint(fieldInfo);
      joinpoint.setTarget(object);
      joinpoint.setValue(value);
      return joinpoint;
   }
View Full Code Here

   public static FieldInfo findFieldInfo(ClassInfo classInfo, String name) throws JoinpointException
   {
      ClassInfo current = classInfo;
      while (current != null)
      {
         FieldInfo result = locateFieldInfo(current, name);
         if (result != null)
            return result;
         current = current.getSuperclass();
      }
      throw new JoinpointException("Field not found '" + name + "' for class " + classInfo.getName());
View Full Code Here

   public FieldInfo getDeclaredField(String name)
   {
      synchronized (fields)
      {
         FieldInfo field = fields.get(name);
         if (field != null)
            return field;
      }
      if (fieldArray != null)
         return null;
View Full Code Here

/*     */   {
/* 167 */     boolean trace = log.isTraceEnabled();
/* 168 */     if (trace) {
/* 169 */       log.trace("Get field get Joinpoint jpf=" + jpf + " target=" + object + " name=" + name);
/*     */     }
/* 171 */     FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name);
/* 172 */     FieldGetJoinpoint joinpoint = jpf.getFieldGetJoinpoint(fieldInfo);
/* 173 */     joinpoint.setTarget(object);
/* 174 */     return joinpoint;
/*     */   }
View Full Code Here

/*     */   {
/* 189 */     boolean trace = log.isTraceEnabled();
/* 190 */     if (trace) {
/* 191 */       log.trace("Get field set Joinpoint jpf=" + jpf + " target=" + object + " name=" + name + " value=" + value);
/*     */     }
/* 193 */     FieldInfo fieldInfo = findFieldInfo(jpf.getClassInfo(), name);
/* 194 */     FieldSetJoinpoint joinpoint = jpf.getFieldSetJoinpoint(fieldInfo);
/* 195 */     joinpoint.setTarget(object);
/* 196 */     joinpoint.setValue(value);
/* 197 */     return joinpoint;
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.reflect.spi.FieldInfo

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.