Package net.percederberg.mibble.type

Examples of net.percederberg.mibble.type.IntegerType


     *
     * @param type           the MIB type
     * @param indent         the indentation to use
     */
    private void printConstraint(MibType type, String indent) {
        IntegerType     intType;
        BitSetType      bitType;
        StringType      strType;

        if (type instanceof IntegerType) {
            intType = (IntegerType) type;
            if (intType.hasSymbols()) {
                os.println(" {");
                printEnumeration(intType.getAllSymbols(),
                                 indent + "    ");
                os.println();
                os.print(indent);
                os.print("}");
            } else if (intType.hasConstraint()) {
                os.print(" (");
                os.print(intType.getConstraint());
                os.print(")");
            }
        } else if (type instanceof BitSetType) {
            bitType = (BitSetType) type;
            if (bitType.hasSymbols()) {
View Full Code Here


     * @param node           the node being exited
     *
     * @return the node to add to the parse tree
     */
    protected Node exitIntegerType(Production node) {
        IntegerType  type;
        ArrayList    values;
        Object       obj;

        values = getChildValues(node);
        if (values.size() == 0) {
            type = new IntegerType();
        } else {
            obj = values.get(0);
            if (obj instanceof ArrayList) {
                type = new IntegerType((ArrayList) obj);
            } else {
                type = new IntegerType((Constraint) obj);
            }
        }
        node.addValue(type);
        return node;
    }
View Full Code Here

TOP

Related Classes of net.percederberg.mibble.type.IntegerType

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.