Package org.jboss.as.console.rebind.forms

Examples of org.jboss.as.console.rebind.forms.BindingDeclaration


        List<ApplicationMetaDataGenerator.PropBindingDeclarations> bindings = ApplicationMetaDataGenerator.mapProperties(beanTypeClass);

        for(ApplicationMetaDataGenerator.PropBindingDeclarations binding : bindings)
        {

            final BindingDeclaration bindDecl = binding.getBindingDeclaration();
            //if(bindDecl.skip()) continue;

            // create and register setters
            final Method setter = findMatchingSetter(bindDecl.getJavaName(), beanTypeClass);

            mut.register(bindDecl.getJavaName(), new Setter() {
                @Override
                public void invoke(Object entity, Object value) {
                    try {
                        if(entity instanceof AutoBeanStub)
                            setter.invoke(((AutoBeanStub)entity).as(), value);
                        else
                            setter.invoke(entity, value);
                    } catch (Throwable e) {
                        throw new RuntimeException("Failed to invoke "+setter.getName(), e);
                    }
                }
            });

            final Method getter = findMatchingGetter(bindDecl.getJavaName(), beanTypeClass);
            mut.register(bindDecl.getJavaName(), new Getter() {
                @Override
                public Object invoke(Object entity) {
                    try {

                        if(entity instanceof AutoBeanStub)
View Full Code Here

TOP

Related Classes of org.jboss.as.console.rebind.forms.BindingDeclaration

Copyright © 2018 www.massapicom. 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.