Package org.richfaces.cdk.apt

Examples of org.richfaces.cdk.apt.SourceUtils


    }

    protected void verifyEvents(ComponentLibrary library) {
        for (EventModel event : library.getEvents()) {
            ClassName listenerInterface = event.getListenerInterface();
            SourceUtils sourceUtils = sourceUtilsProvider.get();
            if (null != listenerInterface) {
                event.setGenerateListener(!sourceUtils.isClassExists(listenerInterface));
            }
            String methodName = event.getListenerMethod();
            if (null == methodName) {
                methodName = "process";
                event.setListenerMethod(methodName);
            }
            ClassName sourceInterface = event.getSourceInterface();
            if (null != sourceInterface) {
                event.setGenerateSource(!sourceUtils.isClassExists(sourceInterface));
            }
            // Propagate event to corresponding components.
            for (ComponentModel component : library.getComponents()) {
                for (EventModel componentEvent : component.getEvents()) {
                    if (event.getType().equals(componentEvent.getType())) {
View Full Code Here


        }
        verifyDescription(attribute);
    }

    private BeanProperty findBeanProperty(PropertyBase attribute, GeneratedFacesComponent component) {
        SourceUtils sourceUtils = sourceUtilsProvider.get();
        BeanProperty beanProperty = sourceUtils.getBeanProperty(component.getBaseClass(), attribute.getName());
        if (beanProperty instanceof DummyPropertyImpl && component instanceof ComponentModel) {
            ComponentModel model = (ComponentModel) component;
            if (null != model.getParent()) {
                beanProperty = findBeanProperty(attribute, model.getParent());
            }
        }
        if (beanProperty instanceof DummyPropertyImpl && component instanceof ModelElementBase) {
            ModelElementBase model = (ModelElementBase) component;
            for (ClassName interfaceName : model.getInterfaces()) {
                beanProperty = sourceUtils.getBeanProperty(interfaceName, attribute.getName());
                if (!(beanProperty instanceof DummyPropertyImpl)) {
                    break;
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.richfaces.cdk.apt.SourceUtils

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.