Examples of BindingDeclaration


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
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.