Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.FieldInfo


      if (classInfo == null)
         throw new IllegalArgumentException("ClassInfo cannot be null!");
      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

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

      Set<PropertyInfo> properties = info.getProperties();
      if (properties != null && properties.isEmpty() == false)
      {
         for(PropertyInfo pi : properties)
         {
            FieldInfo field = pi.getFieldInfo();
            if (field != null)
            {
               Signature sis = new FieldSignature(field);
               MetaData cmdr = retrieval.getComponentMetaData(sis);
               if (cmdr != null)
               {
                  for(T plugin : getPlugins(ElementType.FIELD, null, annotationClasses))
                  {
                     if (isApplyPhase)
                        applyPlugin(plugin, field, cmdr, handle);
                     else
                        cleanPlugin(plugin, field, cmdr, handle);
                  }
               }
               else if (trace)
                  log.trace("No annotations for field " + field.getName());
            }
            // apply setter and getter as well - if they exist
            handleMethod(retrieval, handle, isApplyPhase, trace, visitedMethods, pi, pi.getSetter(), "setter", annotationClasses);
            handleMethod(retrieval, handle, isApplyPhase, trace, visitedMethods, pi, pi.getGetter(), "getter", annotationClasses);
         }
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

   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

   {
      String name = original.getName();

      if (original.isReadable() == false)
      {
         FieldInfo field = getField(name);
         if (field != null && original.getType().isAssignableFrom(field.getType()))
            return new SetterAndFieldPropertyInfo(original, field);
      }
      else if (original.isWritable() == false)
      {
         FieldInfo field = getField(name);
         if (field != null && original.getType().isAssignableFrom(field.getType()))
            return new GetterAndFieldPropertyInfo(original, field);
      }
      return original;
   }
View Full Code Here

         MethodInfo method = MethodInfo.class.cast(member);
         return new MethodSignature(method);
      }
      if (member instanceof FieldInfo)
      {
         FieldInfo field = FieldInfo.class.cast(member);
         return new FieldSignature(field);
      }
      if (member instanceof ConstructorInfo)
      {
         ConstructorInfo constructor = ConstructorInfo.class.cast(member);
View Full Code Here

   {
      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

   {
      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

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.