Package net.sf.laja.parser.cdd.statetemplate

Examples of net.sf.laja.parser.cdd.statetemplate.StateTemplateParser$IStateTemplateFactoryFactory


        Behaviour behaviour = parser.parseBehaviour("C:/Source/IDEA/CSB/src/main/java/csb/domain/customer/Customer.java");
    }

    public StateTemplate parseStateTemplate(final String filePath) {
        StateTemplateParser parser = new StateTemplateParser(new StateTemplateParser.IStateTemplateFactoryFactory() {
            public StateTemplateParser.IStateTemplateFactory getFactory(int phase) {
                String filename = new File(filePath).getName();
                String classname = filename.substring(0, filename.length()-".java".length());
                return new StateTemplateFactory(classname);
            }
        });

        ParsingResult result = parser.parse(new FileSource(filePath));

        if (!result.success()) {
            return null;
        }

        StateTemplateFactory stateTemplateFactory = (StateTemplateFactory)parser.getFactory();
        StateTemplate stateTemplate = stateTemplateFactory.getStateTemplate();

        if (stateTemplate.isValidStatement != null) {
            stateTemplate.isValidStatement = stateTemplate.isValidStatement.trim();
        }
View Full Code Here

TOP

Related Classes of net.sf.laja.parser.cdd.statetemplate.StateTemplateParser$IStateTemplateFactoryFactory

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.