Package org.reflext.api

Examples of org.reflext.api.MethodInfo


    // Build the dispatcher map
    Map<Method, MethodInvoker> dispatchers = new HashMap<Method, MethodInvoker>();
    for (PropertyMapper propertyMapper : propertyMappers) {
      PropertyInfo info = propertyMapper.getInfo();
      MethodInfo getter = info.getGetter();
      if (getter != null) {
        dispatchers.put((Method)getter.getMethod(), propertyMapper);
      }
      MethodInfo setter = info.getSetter();
      if (setter != null) {
        dispatchers.put((Method)setter.getMethod(), propertyMapper);
      }
    }
    for (MethodMapper methodMapper : methodMappers) {
      dispatchers.put(methodMapper.getMethod(), methodMapper);
    }
View Full Code Here


  public void set(ObjectContext context, Object value) throws Throwable {
    throw new UnsupportedOperationException();
  }

  public Object invoke(ObjectContext ctx, Method method, Object[] args) throws Throwable {
    MethodInfo getter = info.getGetter();
    if (getter != null && method.equals(getter.getMethod())) {
      return get(ctx);
    } else {
      MethodInfo setter = info.getSetter();
      if (setter != null && method.equals(info.getSetter().getMethod())) {
        set(ctx, args[0]);
        return null;
      } else {
        throw new AssertionError();
View Full Code Here

    Map<String, PropertyInfo> properties = new HashMap<String, PropertyInfo>();

    //
    for (Map.Entry<String, MethodInfo> getterEntry : getterMap.entrySet()) {
      String name = getterEntry.getKey();
      MethodInfo getter = getterEntry.getValue();
      TypeInfo getterTypeInfo = getter.getReturnType();

      //
      Set<MethodInfo> setters = setterMap.get(name);
      PropertyInfo property = null;
View Full Code Here

TOP

Related Classes of org.reflext.api.MethodInfo

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.