com.vaadin.client.metadata
Class TypeDataStore

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

public class TypeDataStore
extends java.lang.Object


Nested Class Summary
static class TypeDataStore.MethodAttribute
           
 
Constructor Summary
TypeDataStore()
           
 
Method Summary
 void addOnStateChangeMethod(java.lang.Class<?> clazz, OnStateChangeMethod method)
          Adds data about a method annotated with OnStateChange for the given connector type.
 FastStringSet findIdentifiersFor(java.lang.Class<?> type)
           
static JSONSerializer<?> findSerializer(Type type)
           
static TypeDataStore get()
           
static java.lang.Class<?> getClass(java.lang.String identifier)
           
static Invoker getConstructor(Type type)
           
static java.lang.String getDelegateToWidget(Property property)
           
static JsArrayString getDelegateToWidgetProperites(Type type)
           
static Invoker getInvoker(Method method)
           
static FastStringMap<JsArrayObject<OnStateChangeMethod>> getOnStateChangeMethods(java.lang.Class<?> type)
          Gets data for all methods annotated with OnStateChange in the given connector type.
static Type[] getParamTypes(Method method)
           
static Type getPresentationType(java.lang.Class<?> type)
           
static java.util.Collection<Property> getProperties(Type type)
          Deprecated. As of 7.0.1, use getPropertiesAsArray(Type) instead for improved performance
static JsArrayObject<Property> getPropertiesAsArray(Type type)
           
static ProxyHandler getProxyHandler(Type type)
           
static Type getReturnType(Method method)
           
static Type getType(java.lang.Class<?> clazz)
           
static Type getType(Property property)
           
static java.lang.Object getValue(Property property, java.lang.Object target)
           
static boolean hasIdentifier(java.lang.String identifier)
           
static boolean hasProperties(Type type)
           
static boolean isDelayed(Method method)
           
static boolean isLastOnly(Method method)
           
static boolean isNoLayoutProperty(Property property)
          Checks whether the provided property is annotated with NoLayout.
static boolean isNoLayoutRpcMethod(Method method)
          Checks whether the provided method is annotated with NoLayout.
static boolean isNoLoadingIndicator(Method method)
           
 void setClass(java.lang.String identifier, java.lang.Class<?> type)
           
 void setConstructor(java.lang.Class<?> type, Invoker constructor)
           
 void setDelegateToWidget(java.lang.Class<?> clazz, java.lang.String propertyName, java.lang.String delegateValue)
           
 void setInvoker(java.lang.Class<?> type, java.lang.String methodName, Invoker invoker)
           
 void setMethodAttribute(java.lang.Class<?> type, java.lang.String methodName, TypeDataStore.MethodAttribute attribute)
           
 void setParamTypes(java.lang.Class<?> type, java.lang.String methodName, Type[] paramTypes)
           
 void setPresentationType(java.lang.Class<?> type, java.lang.Class<?> presentationType)
           
 void setPropertyData(java.lang.Class<?> type, java.lang.String propertyName, JavaScriptObject propertyData)
           
 void setPropertyType(java.lang.Class<?> clazz, java.lang.String propertyName, Type type)
           
 void setProxyHandler(java.lang.Class<?> type, ProxyHandler proxyHandler)
           
 void setReturnType(java.lang.Class<?> type, java.lang.String methodName, Type returnType)
           
 void setSerializerFactory(java.lang.Class<?> clazz, Invoker factory)
           
 void setSuperClass(java.lang.Class<?> baseClass, java.lang.Class<?> superClass)
           
static void setValue(Property property, java.lang.Object target, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeDataStore

public TypeDataStore()
Method Detail

get

public static TypeDataStore get()

setClass

public void setClass(java.lang.String identifier,
                     java.lang.Class<?> type)

getClass

public static java.lang.Class<?> getClass(java.lang.String identifier)
                                   throws NoDataException
Throws:
NoDataException

findIdentifiersFor

public FastStringSet findIdentifiersFor(java.lang.Class<?> type)

getType

public static Type getType(java.lang.Class<?> clazz)

getReturnType

public static Type getReturnType(Method method)
                          throws NoDataException
Throws:
NoDataException

getInvoker

public static Invoker getInvoker(Method method)
                          throws NoDataException
Throws:
NoDataException

getConstructor

public static Invoker getConstructor(Type type)
                              throws NoDataException
Throws:
NoDataException

getValue

public static java.lang.Object getValue(Property property,
                                        java.lang.Object target)
                                 throws NoDataException
Throws:
NoDataException

getDelegateToWidget

public static java.lang.String getDelegateToWidget(Property property)

getDelegateToWidgetProperites

public static JsArrayString getDelegateToWidgetProperites(Type type)

getPresentationType

public static Type getPresentationType(java.lang.Class<?> type)

setDelegateToWidget

public void setDelegateToWidget(java.lang.Class<?> clazz,
                                java.lang.String propertyName,
                                java.lang.String delegateValue)

setPresentationType

public void setPresentationType(java.lang.Class<?> type,
                                java.lang.Class<?> presentationType)

setReturnType

public void setReturnType(java.lang.Class<?> type,
                          java.lang.String methodName,
                          Type returnType)

setConstructor

public void setConstructor(java.lang.Class<?> type,
                           Invoker constructor)

setInvoker

public void setInvoker(java.lang.Class<?> type,
                       java.lang.String methodName,
                       Invoker invoker)

getParamTypes

public static Type[] getParamTypes(Method method)
                            throws NoDataException
Throws:
NoDataException

setParamTypes

public void setParamTypes(java.lang.Class<?> type,
                          java.lang.String methodName,
                          Type[] paramTypes)

hasIdentifier

public static boolean hasIdentifier(java.lang.String identifier)

getProxyHandler

public static ProxyHandler getProxyHandler(Type type)
                                    throws NoDataException
Throws:
NoDataException

setProxyHandler

public void setProxyHandler(java.lang.Class<?> type,
                            ProxyHandler proxyHandler)

isDelayed

public static boolean isDelayed(Method method)

isNoLoadingIndicator

public static boolean isNoLoadingIndicator(Method method)

setMethodAttribute

public void setMethodAttribute(java.lang.Class<?> type,
                               java.lang.String methodName,
                               TypeDataStore.MethodAttribute attribute)

isLastOnly

public static boolean isLastOnly(Method method)

getProperties

@Deprecated
public static java.util.Collection<Property> getProperties(Type type)
                                                    throws NoDataException
Deprecated. As of 7.0.1, use getPropertiesAsArray(Type) instead for improved performance

Parameters:
type -
Returns:
Throws:
NoDataException

getPropertiesAsArray

public static JsArrayObject<Property> getPropertiesAsArray(Type type)
                                                    throws NoDataException
Throws:
NoDataException

getType

public static Type getType(Property property)
                    throws NoDataException
Throws:
NoDataException

setPropertyType

public void setPropertyType(java.lang.Class<?> clazz,
                            java.lang.String propertyName,
                            Type type)

setValue

public static void setValue(Property property,
                            java.lang.Object target,
                            java.lang.Object value)

setSerializerFactory

public void setSerializerFactory(java.lang.Class<?> clazz,
                                 Invoker factory)

findSerializer

public static JSONSerializer<?> findSerializer(Type type)

hasProperties

public static boolean hasProperties(Type type)

setSuperClass

public void setSuperClass(java.lang.Class<?> baseClass,
                          java.lang.Class<?> superClass)

setPropertyData

public void setPropertyData(java.lang.Class<?> type,
                            java.lang.String propertyName,
                            JavaScriptObject propertyData)

getOnStateChangeMethods

public static FastStringMap<JsArrayObject<OnStateChangeMethod>> getOnStateChangeMethods(java.lang.Class<?> type)
Gets data for all methods annotated with OnStateChange in the given connector type.

Parameters:
type - the connector type
Returns:
a map of state property names to handler method data
Since:
7.2

addOnStateChangeMethod

public void addOnStateChangeMethod(java.lang.Class<?> clazz,
                                   OnStateChangeMethod method)
Adds data about a method annotated with OnStateChange for the given connector type.

Parameters:
clazz - the connector type
method - the state change method data
Since:
7.2

isNoLayoutRpcMethod

public static boolean isNoLayoutRpcMethod(Method method)
Checks whether the provided method is annotated with NoLayout.

Parameters:
method - the rpc method to check
Returns:
true if the method has a NoLayout annotation; otherwise false
Since:
7.4

isNoLayoutProperty

public static boolean isNoLayoutProperty(Property property)
Checks whether the provided property is annotated with NoLayout.

Parameters:
property - the property to check
Returns:
true if the property has a NoLayout annotation; otherwise false
Since:
7.4


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