com.vaadin.client.metadata
Class OnStateChangeMethod

java.lang.Object
  extended by com.vaadin.client.metadata.OnStateChangeMethod

public class OnStateChangeMethod
extends java.lang.Object

Encapsulates the data that the widgetset compiler generates for supporting a connector method annotated with OnStateChange

Since:
7.2
Author:
Vaadin Ltd

Constructor Summary
OnStateChangeMethod(java.lang.Class<?> declaringClass, java.lang.String methodName, java.lang.String[] properties)
          Creates a new instance based on declaring class, a method name, a list of parameters names and a list of properties to listen for.
OnStateChangeMethod(java.lang.String methodName, java.lang.String[] properties)
          Creates a new instance based on a method name, a list of parameters names and a list of properties to listen for.
 
Method Summary
 java.util.List<java.lang.String> getProperties()
          Gets the list of state property names to listen for.
 void invoke(StateChangeEvent stateChangeEvent)
          Invokes the listener method for a state change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OnStateChangeMethod

public OnStateChangeMethod(java.lang.String methodName,
                           java.lang.String[] properties)
Creates a new instance based on a method name, a list of parameters names and a list of properties to listen for.

Parameters:
methodName - the name of the method to call
properties - an array of state property names to listen to

OnStateChangeMethod

public OnStateChangeMethod(java.lang.Class<?> declaringClass,
                           java.lang.String methodName,
                           java.lang.String[] properties)
Creates a new instance based on declaring class, a method name, a list of parameters names and a list of properties to listen for.

If the declaring class is null, the method is found based on the type of the connector that fired the state change event.

Parameters:
declaringClass - the class in which the target method is declared, or null to use the class of the connector firing the event
methodName - the name of the method to call
properties - an array of state property names to listen to
Method Detail

invoke

public void invoke(StateChangeEvent stateChangeEvent)
Invokes the listener method for a state change.

Parameters:
stateChangeEvent - the state change event

getProperties

public java.util.List<java.lang.String> getProperties()
Gets the list of state property names to listen for.

Returns:
the list of state property names to listen for


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.