Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: TencentKona-8   Source File: Sort.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Run type checks on the attributes; expression must return a string
 * which we will use as a sort key
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);

    // If the sort data-type is not set we use the natural data-type
    // of the data we will sort
    if (!(tselect instanceof StringType)) {
        _select = new CastExpr(_select, Type.String);
    }

    _order.typeCheck(stable);
    _caseOrder.typeCheck(stable);
    _dataType.typeCheck(stable);
    _lang.typeCheck(stable);
    return Type.Void;
}
 
Example 2
Source Project: openjdk-jdk8u   Source File: Sort.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Run type checks on the attributes; expression must return a string
 * which we will use as a sort key
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);

    // If the sort data-type is not set we use the natural data-type
    // of the data we will sort
    if (!(tselect instanceof StringType)) {
        _select = new CastExpr(_select, Type.String);
    }

    _order.typeCheck(stable);
    _caseOrder.typeCheck(stable);
    _dataType.typeCheck(stable);
    _lang.typeCheck(stable);
    return Type.Void;
}
 
Example 3
Source Project: Bytecoder   Source File: Sort.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Run type checks on the attributes; expression must return a string
 * which we will use as a sort key
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);

    // If the sort data-type is not set we use the natural data-type
    // of the data we will sort
    if (!(tselect instanceof StringType)) {
        _select = new CastExpr(_select, Type.String);
    }

    _order.typeCheck(stable);
    _caseOrder.typeCheck(stable);
    _dataType.typeCheck(stable);
    _lang.typeCheck(stable);
    return Type.Void;
}
 
Example 4
Source Project: jdk1.8-source-analysis   Source File: TransletOutput.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Type checks the 'file' attribute (must be able to convert it to a str).
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type type = _filename.typeCheck(stable);
    if (type instanceof StringType == false) {
        _filename = new CastExpr(_filename, Type.String);
    }
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 5
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type entity = _entity.typeCheck(stable);
    if (entity instanceof StringType == false) {
        _entity = new CastExpr(_entity, Type.String);
    }
    return _type = Type.String;
}
 
Example 6
Source Project: jdk1.8-source-analysis   Source File: FormatNumberCall.java    License: Apache License 2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

        // Inform stylesheet to instantiate a DecimalFormat object
        getStylesheet().numberFormattingUsed();

        final Type tvalue = _value.typeCheck(stable);
        if (tvalue instanceof RealType == false) {
            _value = new CastExpr(_value, Type.Real);
        }
        final Type tformat = _format.typeCheck(stable);
        if (tformat instanceof StringType == false) {
            _format = new CastExpr(_format, Type.String);
        }
        if (argumentCount() == 3) {
            final Type tname = _name.typeCheck(stable);

            if (_name instanceof LiteralExpr) {
                final LiteralExpr literal = (LiteralExpr) _name;
                _resolvedQName =
                    getParser().getQNameIgnoreDefaultNs(literal.getValue());
            }
            else if (tname instanceof StringType == false) {
                _name = new CastExpr(_name, Type.String);
            }
        }
        return _type = Type.String;
    }
 
Example 7
Source Project: jdk1.8-source-analysis   Source File: Sort.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * Run type checks on the attributes; expression must return a string
 * which we will use as a sort key
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);

    // If the sort data-type is not set we use the natural data-type
    // of the data we will sort
    if (!(tselect instanceof StringType)) {
        _select = new CastExpr(_select, Type.String);
    }

    _order.typeCheck(stable);
    _caseOrder.typeCheck(stable);
    _dataType.typeCheck(stable);
    return Type.Void;
}
 
Example 8
Source Project: jdk1.8-source-analysis   Source File: Key.java    License: Apache License 2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type check match pattern
    _match.typeCheck(stable);

    // Cast node values to string values (except for nodesets)
    _useType = _use.typeCheck(stable);
    if (_useType instanceof StringType == false &&
        _useType instanceof NodeSetType == false)
    {
        _use = new CastExpr(_use, Type.String);
    }

    return Type.Void;
}
 
Example 9
Source Project: jdk1.8-source-analysis   Source File: LangCall.java    License: Apache License 2.0 5 votes vote down vote up
/**
 *
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _langType = _lang.typeCheck(stable);
    if (!(_langType instanceof StringType)) {
        _lang = new CastExpr(_lang, Type.String);
    }
    return Type.Boolean;
}
 
Example 10
Source Project: TencentKona-8   Source File: TransletOutput.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type checks the 'file' attribute (must be able to convert it to a str).
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type type = _filename.typeCheck(stable);
    if (type instanceof StringType == false) {
        _filename = new CastExpr(_filename, Type.String);
    }
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 11
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type entity = _entity.typeCheck(stable);
    if (entity instanceof StringType == false) {
        _entity = new CastExpr(_entity, Type.String);
    }
    return _type = Type.String;
}
 
Example 12
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

        // Inform stylesheet to instantiate a DecimalFormat object
        getStylesheet().numberFormattingUsed();

        final Type tvalue = _value.typeCheck(stable);
        if (tvalue instanceof RealType == false) {
            _value = new CastExpr(_value, Type.Real);
        }
        final Type tformat = _format.typeCheck(stable);
        if (tformat instanceof StringType == false) {
            _format = new CastExpr(_format, Type.String);
        }
        if (argumentCount() == 3) {
            final Type tname = _name.typeCheck(stable);

            if (_name instanceof LiteralExpr) {
                final LiteralExpr literal = (LiteralExpr) _name;
                _resolvedQName =
                    getParser().getQNameIgnoreDefaultNs(literal.getValue());
            }
            else if (tname instanceof StringType == false) {
                _name = new CastExpr(_name, Type.String);
            }
        }
        return _type = Type.String;
    }
 
Example 13
Source Project: TencentKona-8   Source File: Key.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type check match pattern
    _match.typeCheck(stable);

    // Cast node values to string values (except for nodesets)
    _useType = _use.typeCheck(stable);
    if (_useType instanceof StringType == false &&
        _useType instanceof NodeSetType == false)
    {
        _use = new CastExpr(_use, Type.String);
    }

    return Type.Void;
}
 
Example 14
Source Project: TencentKona-8   Source File: LangCall.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _langType = _lang.typeCheck(stable);
    if (!(_langType instanceof StringType)) {
        _lang = new CastExpr(_lang, Type.String);
    }
    return Type.Boolean;
}
 
Example 15
Source Project: jdk8u60   Source File: TransletOutput.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type checks the 'file' attribute (must be able to convert it to a str).
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type type = _filename.typeCheck(stable);
    if (type instanceof StringType == false) {
        _filename = new CastExpr(_filename, Type.String);
    }
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 16
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type entity = _entity.typeCheck(stable);
    if (entity instanceof StringType == false) {
        _entity = new CastExpr(_entity, Type.String);
    }
    return _type = Type.String;
}
 
Example 17
Source Project: jdk8u60   Source File: FormatNumberCall.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

        // Inform stylesheet to instantiate a DecimalFormat object
        getStylesheet().numberFormattingUsed();

        final Type tvalue = _value.typeCheck(stable);
        if (tvalue instanceof RealType == false) {
            _value = new CastExpr(_value, Type.Real);
        }
        final Type tformat = _format.typeCheck(stable);
        if (tformat instanceof StringType == false) {
            _format = new CastExpr(_format, Type.String);
        }
        if (argumentCount() == 3) {
            final Type tname = _name.typeCheck(stable);

            if (_name instanceof LiteralExpr) {
                final LiteralExpr literal = (LiteralExpr) _name;
                _resolvedQName =
                    getParser().getQNameIgnoreDefaultNs(literal.getValue());
            }
            else if (tname instanceof StringType == false) {
                _name = new CastExpr(_name, Type.String);
            }
        }
        return _type = Type.String;
    }
 
Example 18
Source Project: jdk8u60   Source File: Sort.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Run type checks on the attributes; expression must return a string
 * which we will use as a sort key
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);

    // If the sort data-type is not set we use the natural data-type
    // of the data we will sort
    if (!(tselect instanceof StringType)) {
        _select = new CastExpr(_select, Type.String);
    }

    _order.typeCheck(stable);
    _caseOrder.typeCheck(stable);
    _dataType.typeCheck(stable);
    return Type.Void;
}
 
Example 19
Source Project: jdk8u60   Source File: Key.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type check match pattern
    _match.typeCheck(stable);

    // Cast node values to string values (except for nodesets)
    _useType = _use.typeCheck(stable);
    if (_useType instanceof StringType == false &&
        _useType instanceof NodeSetType == false)
    {
        _use = new CastExpr(_use, Type.String);
    }

    return Type.Void;
}
 
Example 20
Source Project: jdk8u60   Source File: LangCall.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 *
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _langType = _lang.typeCheck(stable);
    if (!(_langType instanceof StringType)) {
        _lang = new CastExpr(_lang, Type.String);
    }
    return Type.Boolean;
}
 
Example 21
Source Project: JDKSourceCode1.8   Source File: TransletOutput.java    License: MIT License 5 votes vote down vote up
/**
 * Type checks the 'file' attribute (must be able to convert it to a str).
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type type = _filename.typeCheck(stable);
    if (type instanceof StringType == false) {
        _filename = new CastExpr(_filename, Type.String);
    }
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 22
Source Project: JDKSourceCode1.8   Source File: UnparsedEntityUriCall.java    License: MIT License 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type entity = _entity.typeCheck(stable);
    if (entity instanceof StringType == false) {
        _entity = new CastExpr(_entity, Type.String);
    }
    return _type = Type.String;
}
 
Example 23
Source Project: JDKSourceCode1.8   Source File: FormatNumberCall.java    License: MIT License 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

        // Inform stylesheet to instantiate a DecimalFormat object
        getStylesheet().numberFormattingUsed();

        final Type tvalue = _value.typeCheck(stable);
        if (tvalue instanceof RealType == false) {
            _value = new CastExpr(_value, Type.Real);
        }
        final Type tformat = _format.typeCheck(stable);
        if (tformat instanceof StringType == false) {
            _format = new CastExpr(_format, Type.String);
        }
        if (argumentCount() == 3) {
            final Type tname = _name.typeCheck(stable);

            if (_name instanceof LiteralExpr) {
                final LiteralExpr literal = (LiteralExpr) _name;
                _resolvedQName =
                    getParser().getQNameIgnoreDefaultNs(literal.getValue());
            }
            else if (tname instanceof StringType == false) {
                _name = new CastExpr(_name, Type.String);
            }
        }
        return _type = Type.String;
    }
 
Example 24
Source Project: JDKSourceCode1.8   Source File: Sort.java    License: MIT License 5 votes vote down vote up
/**
 * Run type checks on the attributes; expression must return a string
 * which we will use as a sort key
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type tselect = _select.typeCheck(stable);

    // If the sort data-type is not set we use the natural data-type
    // of the data we will sort
    if (!(tselect instanceof StringType)) {
        _select = new CastExpr(_select, Type.String);
    }

    _order.typeCheck(stable);
    _caseOrder.typeCheck(stable);
    _dataType.typeCheck(stable);
    return Type.Void;
}
 
Example 25
Source Project: JDKSourceCode1.8   Source File: Key.java    License: MIT License 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type check match pattern
    _match.typeCheck(stable);

    // Cast node values to string values (except for nodesets)
    _useType = _use.typeCheck(stable);
    if (_useType instanceof StringType == false &&
        _useType instanceof NodeSetType == false)
    {
        _use = new CastExpr(_use, Type.String);
    }

    return Type.Void;
}
 
Example 26
Source Project: JDKSourceCode1.8   Source File: LangCall.java    License: MIT License 5 votes vote down vote up
/**
 *
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _langType = _lang.typeCheck(stable);
    if (!(_langType instanceof StringType)) {
        _lang = new CastExpr(_lang, Type.String);
    }
    return Type.Boolean;
}
 
Example 27
Source Project: openjdk-jdk8u   Source File: TransletOutput.java    License: GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type checks the 'file' attribute (must be able to convert it to a str).
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type type = _filename.typeCheck(stable);
    if (type instanceof StringType == false) {
        _filename = new CastExpr(_filename, Type.String);
    }
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 28
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    final Type entity = _entity.typeCheck(stable);
    if (entity instanceof StringType == false) {
        _entity = new CastExpr(_entity, Type.String);
    }
    return _type = Type.String;
}
 
Example 29
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

        // Inform stylesheet to instantiate a DecimalFormat object
        getStylesheet().numberFormattingUsed();

        final Type tvalue = _value.typeCheck(stable);
        if (tvalue instanceof RealType == false) {
            _value = new CastExpr(_value, Type.Real);
        }
        final Type tformat = _format.typeCheck(stable);
        if (tformat instanceof StringType == false) {
            _format = new CastExpr(_format, Type.String);
        }
        if (argumentCount() == 3) {
            final Type tname = _name.typeCheck(stable);

            if (_name instanceof LiteralExpr) {
                final LiteralExpr literal = (LiteralExpr) _name;
                _resolvedQName =
                    getParser().getQNameIgnoreDefaultNs(literal.getValue());
            }
            else if (tname instanceof StringType == false) {
                _name = new CastExpr(_name, Type.String);
            }
        }
        return _type = Type.String;
    }
 
Example 30
Source Project: openjdk-jdk8u   Source File: Key.java    License: GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type check match pattern
    _match.typeCheck(stable);

    // Cast node values to string values (except for nodesets)
    _useType = _use.typeCheck(stable);
    if (_useType instanceof StringType == false &&
        _useType instanceof NodeSetType == false)
    {
        _use = new CastExpr(_use, Type.String);
    }

    return Type.Void;
}