Package com.gwtent.reflection.client

Examples of com.gwtent.reflection.client.Method


    if (! isMethod(path)){
      Field field = parent.findField(path);
      if (field != null)
        typeName = field.getTypeName();
    }else{
      Method method = parent.findMethod(path, new String[0]);
     
      if (method != null)
        typeName = method.getReturnTypeName();
    }
   
    if (typeName == null)
      throw new RuntimeException("Path("+ path +") not found or returns null, please make sure its exists and can be access by subclass. full path: " + fullPath + "current path: " + path);
   
View Full Code Here


      if (field == null)
        pathNotFound(path, fullPath);
     
      object = field.getFieldValue(instance);
    }else{
      Method method = parent.findMethod(path, new String[0]);
      if (method == null)
        pathNotFound(path, fullPath);
     
      object = method.invoke(instance, null);
    }
   
    if (object == null)
      throw new ENullInPath(fullPath, path);
   
View Full Code Here

   *
   * @see com.gwtent.client.reflection.ClassType#findMethod(java.lang.String,
   * com.gwtent.client.reflection.Type[])
   */
  public Method findMethod(String name, Type[] paramTypes) {
    Method method = null;
    if (paramTypes == null)
      paramTypes = new Type[] {};

    Method[] overloads = getOverloads(name);
    for (int i = 0; i < overloads.length; i++) {
      Method candidate = overloads[i];
      if (((MethodImpl) candidate).hasParamTypes(paramTypes)) {
        method = candidate;
      }
    }

View Full Code Here

   *
   * @see com.gwtent.client.reflection.ClassType#findMethod(java.lang.String,
   * java.lang.String[])
   */
  public Method findMethod(String name, String[] paramTypes) {
    Method method = null;

    if (paramTypes == null)
      paramTypes = new String[0];

    Method[] overloads = getOverloads(name);
View Full Code Here

   *
   * @see com.gwtent.client.reflection.ClassType#getMethod(java.lang.String,
   * com.gwtent.client.reflection.Type[])
   */
  public Method getMethod(String name, Type[] paramTypes) throws NotFoundException {
    Method result = findMethod(name, paramTypes);
    // if (result == null) {
    // throw new NotFoundException();
    // }
    return result;
  }
View Full Code Here

  public Annotation[] getDeclaredAnnotations() {
    return annotations.getDeclaredAnnotations();
  }
 
  public Object getFieldValue(Object instance) throws FieldIllegalAccessException{
    Method getter = ReflectionUtils.getGetter(this.getEnclosingType(), this
        .getName());
    if (getter != null) {
      return getter.invoke(instance, new Object[] {});
    } else {
      //sxf update
//      throw new RuntimeException("Can not found getter of field (" + getName()
//          + ").");
      return this.getEnclosingType().getFieldValue(instance,getName());
View Full Code Here

TOP

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

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.