Package com.vaadin.client.metadata
Class OnStateChangeMethod
- java.lang.Object
-
- com.vaadin.client.metadata.OnStateChangeMethod
-
public class OnStateChangeMethod extends Object
Encapsulates the data that the widgetset compiler generates for supporting a connector method annotated withOnStateChange
- Since:
- 7.2
- Author:
- Vaadin Ltd
-
-
Constructor Summary
Constructors Constructor Description OnStateChangeMethod(Class<?> declaringClass, String methodName, 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(String methodName, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getProperties()
Gets the list of state property names to listen for.void
invoke(StateChangeEvent stateChangeEvent)
Invokes the listener method for a state change.
-
-
-
Constructor Detail
-
OnStateChangeMethod
public OnStateChangeMethod(String methodName, 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 callproperties
- an array of state property names to listen to
-
OnStateChangeMethod
public OnStateChangeMethod(Class<?> declaringClass, String methodName, 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, ornull
to use the class of the connector firing the eventmethodName
- the name of the method to callproperties
- 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
-
-