Package com.volantis.devrep.device.api.xml.definitions

Examples of com.volantis.devrep.device.api.xml.definitions.TypeDeclaration


    }

    private void dumpDefinitions(DefinitionSet definitionSet, StringBuffer buffer) {
        Iterator types = definitionSet.types();
        while (types.hasNext()) {
            TypeDeclaration typeDeclaration = (TypeDeclaration) types.next();
            dumpTypeDeclaration(typeDeclaration, buffer);

        }
        Iterator categories = definitionSet.categories();
        while (categories.hasNext()) {
View Full Code Here


        // custom definiton sets have no types and custom definitions are
        // always in the custom category.

        Iterator types = definitionSet.types();
        while (types.hasNext()) {
            TypeDeclaration type = (TypeDeclaration) types.next();
            definitions.addType(type);
        }

        addDefinitionSetCategoriesToDefinitions(definitionSet, definitions);
    }
View Full Code Here

            final TypeContainer typeContainer = policy.getTypeContainer();
            String typeName = typeContainer.getName();
            Type type = typeContainer.getType();
            if (typeName != null && type == null) {
                // this is a reference to a declared type.
                TypeDeclaration declaration = definitions.getType(typeName);
                if (declaration == null) {
                    throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                            "repository-unable-to-find-type-information",
                            typeName));
                }
                type = declaration.getType();
            } else if (typeName == null && type != null) {
                // this is an anonymous type

            } else if (typeName == null && type == null) {
                // nothing specified, error.
View Full Code Here

        categories.add(category);
    }

    public void addType(TypeDeclaration type) {
        TypeDeclaration old = (TypeDeclaration)
                nameToTypeMap.put(type.getName(), type);
        if (old != null) {
            throw new IllegalStateException("cannot add duplicate type");
        }
        types.add(type);
View Full Code Here

TOP

Related Classes of com.volantis.devrep.device.api.xml.definitions.TypeDeclaration

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.