[zb4osgi-changeset] [scm] ZigBee 4 OSGi repository change: r566 - /projects/zb4osgi/trunk/zigbee.tester/src/main/java/org/persona/zigbee/tester/gui/HADeviceTreeNode.java

scm-notify at zb4osgi.aaloa.org scm-notify at zb4osgi.aaloa.org
Wed Oct 24 11:49:21 CEST 2012


Author: stefano.lenzi
Date: Wed Oct 24 11:49:21 2012
New Revision: 566

Log:
Changed again the policy for identifyin command among the methods of a Cluster ( refs #150 )

Modified:
    projects/zb4osgi/trunk/zigbee.tester/src/main/java/org/persona/zigbee/tester/gui/HADeviceTreeNode.java

Modified: projects/zb4osgi/trunk/zigbee.tester/src/main/java/org/persona/zigbee/tester/gui/HADeviceTreeNode.java
==============================================================================
--- projects/zb4osgi/trunk/zigbee.tester/src/main/java/org/persona/zigbee/tester/gui/HADeviceTreeNode.java (original)
+++ projects/zb4osgi/trunk/zigbee.tester/src/main/java/org/persona/zigbee/tester/gui/HADeviceTreeNode.java Wed Oct 24 11:49:21 2012
@@ -154,16 +154,12 @@
 			}
 			final String methodName = methods[i].getName();
 			final Class<?> returnType = methods[i].getReturnType();
-			if (  returnType == void.class || Response.class.isAssignableFrom( returnType ) ) {
-				this.add(new HADeviceTreeNode(new Command(obj, methods[i])));
-			/*
 			if ( methodName.equals("subscribe") || methodName.equals("unsubscribe") ){
 				//We skip method that are only a way to access method available at level of attribute
 				continue;
-			} else if ( methodName.startsWith("get") && Attribute.class.isAssignableFrom(methods[i].getReturnType()) ) {
+			} else if ( methodName.startsWith("get") && ( !( returnType == void.class || Response.class.isAssignableFrom( returnType ) ) ) ) {
 				//We skip method that are only a way to access method available at level of attribute
 				continue;
-			*/				
 			} else if ( methodName.startsWith("add") || methodName.startsWith("remove") ) {
 			    Class<?>[] args = methods[i].getParameterTypes();
 			    if( args.length == 1 && args[0].getName().endsWith( "Listener" ) ){
@@ -180,7 +176,9 @@
 	                if( isDuplicate ) continue;
 	                this.add(new HADeviceTreeNode(new HAEvent(obj, pairName)));
 	                //TODO Add support for Specific Cluster Eventing
+	                continue;
 			    }
+				this.add(new HADeviceTreeNode(new Command(obj, methods[i])));
 			}
 			
 		}




More information about the Commit mailing list