1 22 package org.jboss.reflect.plugins.introspection; 23 24 import java.lang.reflect.Field ; 25 26 import org.jboss.reflect.plugins.FieldInfoImpl; 27 import org.jboss.reflect.spi.AnnotationValue; 28 import org.jboss.reflect.spi.ClassInfo; 29 import org.jboss.reflect.spi.TypeInfo; 30 31 37 public class ReflectFieldInfoImpl extends FieldInfoImpl 38 { 39 40 private static final long serialVersionUID = 6545568268659038195L; 41 42 43 protected Field field; 44 45 48 public ReflectFieldInfoImpl() 49 { 50 } 51 52 61 public ReflectFieldInfoImpl(AnnotationValue[] annotations, String name, TypeInfo type, int modifiers, ClassInfo declaring) 62 { 63 super(annotations, name, type, modifiers, declaring); 64 } 65 66 71 public void setField(Field field) 72 { 73 this.field = field; 74 } 75 76 81 public Field getField() 82 { 83 return field; 84 } 85 86 public Object get(Object target) throws Throwable 87 { 88 return ReflectionUtils.getField(field, target); 89 } 90 91 public Object set(Object target, Object value) throws Throwable 92 { 93 return ReflectionUtils.setField(field, target, value); 94 } 95 } 96 | Popular Tags |