Package com.asakusafw.dmdl.spi

Examples of com.asakusafw.dmdl.spi.AttributeDriver


    private void resolveAttributes(Declaration declaration) {
        assert declaration != null;
        for (AstAttribute attribute : declaration.getAttributes()) {
            String name = attribute.name.toString();
            LOG.debug("Resolving attribute: {} -> {}", declaration.getName(), name); //$NON-NLS-1$
            AttributeDriver driver = context.findAttributeDriver(attribute);
            if (driver == null) {
                report(new Diagnostic(
                        Level.ERROR,
                        attribute.name,
                        Messages.getString("DmdlAnalyzer.diagnosticUnknownAttribute"), //$NON-NLS-1$
                        name));
                continue;
            }
            LOG.debug("Processing attribute: {} -> {}", name, driver); //$NON-NLS-1$
            driver.process(context.getWorld(), declaration, attribute);
        }
    }
View Full Code Here


    private void verifyAttributes(Declaration declaration) {
        assert declaration != null;
        for (AstAttribute attribute : declaration.getAttributes()) {
            String name = attribute.name.toString();
            AttributeDriver driver = context.findAttributeDriver(attribute);
            if (driver == null) {
                // may not occur
                continue;
            }
            LOG.debug("Verifying attribute: {} -> {}", name, driver); //$NON-NLS-1$
            driver.verify(context.getWorld(), declaration, attribute);
        }
    }
View Full Code Here

        Map<String, AttributeDriver> results = Maps.create();
        for (Map.Entry<String, List<AttributeDriver>> entry : group.entrySet()) {
            String target = entry.getKey();
            LOG.debug("Enabling attribute: {}", target); //$NON-NLS-1$
            List<AttributeDriver> targetDrivers = entry.getValue();
            AttributeDriver singular;
            if (targetDrivers.size() == 1) {
                singular = targetDrivers.get(0);
            } else {
                assert targetDrivers.isEmpty() == false;
                singular = new CompositeAttributeDriver(targetDrivers);
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.spi.AttributeDriver

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.