Package com.gwtent.reflection.client

Examples of com.gwtent.reflection.client.FieldIllegalAccessException


  // sxf add
  public Object getFieldValue(Object instance, String fieldName) throws FieldIllegalAccessException {
    // no need to call findField(),because we don't want field in super class
    Field field = fields.get(fieldName);
    if (field != null && field.isPrivate()) {
      throw new FieldIllegalAccessException(getName() + "." + fieldName + " is private,can't access");
    }
    if (this.getSuperclass() != null)
      return getSuperclass().getFieldValue(instance, fieldName);
    else
      throw new NotFoundException(fieldName + " not found or unimplement?");
View Full Code Here


  public void setFieldValue(Object instance, String fieldName, Object value) throws FieldIllegalAccessException {

    // no need to call findField(),because we don't want field in super class
    Field field = fields.get(fieldName);
    if (field != null && field.isPrivate()) {
      throw new FieldIllegalAccessException(getName() + "." + fieldName + " is private,can't access");
    }
    if (field != null && field.isFinal()) {
      throw new FieldIllegalAccessException(getName() + "." + fieldName + " is final,can't access");
    }

    if (this.getSuperclass() != null)
      getSuperclass().setFieldValue(instance, fieldName, value);
    else
View Full Code Here

TOP

Related Classes of com.gwtent.reflection.client.FieldIllegalAccessException

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.