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

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType. 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 File: Sort.java    From openjdk-jdk8u with 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 File: Sort.java    From TencentKona-8 with 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 File: Sort.java    From Bytecoder with 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 File: FormatNumberCall.java    From openjdk-8 with 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 #5
Source File: Key.java    From openjdk-jdk9 with 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 #6
Source File: LangCall.java    From openjdk-jdk9 with 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 #7
Source File: Sort.java    From openjdk-8-source with 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 #8
Source File: LangCall.java    From openjdk-8 with 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 #9
Source File: Key.java    From openjdk-8 with 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 #10
Source File: Sort.java    From openjdk-8 with 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 #11
Source File: FormatNumberCall.java    From openjdk-jdk9 with 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 #12
Source File: UnparsedEntityUriCall.java    From openjdk-8 with GNU General Public License v2.0 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 #13
Source File: TransletOutput.java    From openjdk-8 with 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 #14
Source File: LangCall.java    From openjdk-8-source with 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 File: Key.java    From openjdk-8-source with 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 #16
Source File: FormatNumberCall.java    From hottub with 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 #17
Source File: Key.java    From hottub with 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 #18
Source File: Sort.java    From openjdk-jdk9 with 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 File: UnparsedEntityUriCall.java    From hottub with GNU General Public License v2.0 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 #20
Source File: UnparsedEntityUriCall.java    From openjdk-jdk9 with GNU General Public License v2.0 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 #21
Source File: TransletOutput.java    From openjdk-jdk9 with 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 #22
Source File: LangCall.java    From Bytecoder with 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 #23
Source File: Key.java    From Bytecoder with 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 #24
Source File: FormatNumberCall.java    From Bytecoder with 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 #25
Source File: UnparsedEntityUriCall.java    From Bytecoder with Apache License 2.0 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 #26
Source File: TransletOutput.java    From Bytecoder with 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 #27
Source File: LangCall.java    From openjdk-jdk8u-backup with 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 #28
Source File: Key.java    From openjdk-jdk8u-backup with 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 #29
Source File: TransletOutput.java    From jdk1.8-source-analysis with 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 #30
Source File: FormatNumberCall.java    From openjdk-jdk8u-backup with 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;
    }