Package com.vaadin.client.metadata

Examples of com.vaadin.client.metadata.Type.createInstance()


     * @return A new state object
     */
    protected SharedState createState() {
        try {
            Type stateType = getStateType(this);
            Object stateInstance = stateType.createInstance();
            return (SharedState) stateInstance;
        } catch (NoDataException e) {
            throw new IllegalStateException(
                    "There is no information about the state for "
                            + Util.getSimpleName(this)
View Full Code Here


                    Type stateType = AbstractConnector.getStateType(connector);
                    Profiler.leave("ApplicationConnection recursivelyDetach reset state - getStateType");

                    // Empty state instance to get default property values from
                    Profiler.enter("ApplicationConnection recursivelyDetach reset state - createInstance");
                    Object defaultState = stateType.createInstance();
                    Profiler.leave("ApplicationConnection recursivelyDetach reset state - createInstance");

                    if (connector instanceof AbstractConnector) {
                        // optimization as the loop setting properties is very
                        // slow, especially on IE8
View Full Code Here

     */
    protected Widget createWidget() {
        Type type = TypeData.getType(getClass());
        try {
            Type widgetType = type.getMethod("getWidget").getReturnType();
            Object instance = widgetType.createInstance();
            return (Widget) instance;
        } catch (NoDataException e) {
            throw new IllegalStateException(
                    "Default implementation of createWidget() does not work for "
                            + Util.getSimpleName(this)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.