Package com.zenesis.qx.remote.annotations

Examples of com.zenesis.qx.remote.annotations.Property


        if (event != null)
          events.put(event.getName(), event);
      }
    }
    for (Field field : clazz.getDeclaredFields()) {
      Property anno = field.getAnnotation(Property.class);
      if (anno != null) {
        ProxyProperty property = new ProxyPropertyImpl(clazz, anno.value().length() > 0 ? anno.value() : field.getName(), anno, annoProperties);
        properties.put(property.getName(), property);
        ProxyEvent event = property.getEvent();
        if (event != null)
          events.put(event.getName(), event);
      }
    }
   
    for (Method method : clazz.getDeclaredMethods()) {
      String name = method.getName();
      if (name.length() < 4 || !name.startsWith("get") || !Character.isUpperCase(name.charAt(3)))
        continue;
      Property anno = method.getAnnotation(Property.class);
      if (anno == null)
        continue;

      name = Character.toLowerCase(name.charAt(3)) + name.substring(4);
      if (properties.containsKey(name))
        continue;
     
      ProxyProperty property = new ProxyPropertyImpl(clazz, anno.value().length() > 0 ? anno.value() : name, anno, annoProperties);
      properties.put(property.getName(), property);
      ProxyEvent event = property.getEvent();
      if (event != null)
        events.put(event.getName(), event);
    }
View Full Code Here

TOP

Related Classes of com.zenesis.qx.remote.annotations.Property

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.