Java Code Examples for com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#Void

The following examples show how to use com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type#Void . 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: Param.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Type-checks the parameter. The parameter type is determined by the
 * 'select' expression (if present) or is a result tree if the parameter
 * element has a body and no 'select' expression.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        _type = _select.typeCheck(stable);
        if (_type instanceof ReferenceType == false && !(_type instanceof ObjectType)) {
            _select = new CastExpr(_select, Type.Reference);
        }
    }
    else if (hasContents()) {
        typeCheckContents(stable);
    }
    _type = Type.Reference;

    // This element has no type (the parameter does, but the parameter
    // element itself does not).
    return Type.Void;
}
 
Example 2
Source File: AttributeSet.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type check the contents of this element
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {

    if (_ignore) return (Type.Void);

    // _mergeSet Point to any previous definition of this attribute set
    _mergeSet = stable.addAttributeSet(this);

    _method = AttributeSetPrefix + getXSLTC().nextAttributeSetSerial();

    if (_useSets != null) _useSets.typeCheck(stable);
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 3
Source File: If.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Type-check the "test" expression and contents of this element.
 * The contents will be ignored if we know the test will always fail.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type-check the "test" expression
    if (_test.typeCheck(stable) instanceof BooleanType == false) {
        _test = new CastExpr(_test, Type.Boolean);
    }
    // Type check the element contents
    if (!_ignore) {
        typeCheckContents(stable);
    }
    return Type.Void;
}
 
Example 4
Source File: WithParam.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Type-check either the select attribute or the element body, depending
 * on which is in use.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (_select != null) {
        final Type tselect = _select.typeCheck(stable);
        if (tselect instanceof ReferenceType == false) {
            _select = new CastExpr(_select, Type.Reference);
        }
    } else {
        typeCheckContents(stable);
    }
    return Type.Void;
}
 
Example 5
Source File: Key.java    From JDKSourceCode1.8 with 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 6
Source File: If.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type-check the "test" expression and contents of this element.
 * The contents will be ignored if we know the test will always fail.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type-check the "test" expression
    if (_test.typeCheck(stable) instanceof BooleanType == false) {
        _test = new CastExpr(_test, Type.Boolean);
    }
    // Type check the element contents
    if (!_ignore) {
        typeCheckContents(stable);
    }
    return Type.Void;
}
 
Example 7
Source File: XslAttribute.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    if (!_ignore) {
        _name.typeCheck(stable);
        if (_namespace != null) {
            _namespace.typeCheck(stable);
        }
        typeCheckContents(stable);
    }
    return Type.Void;
}
 
Example 8
Source File: Key.java    From jdk8u60 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 9
Source File: SyntaxTreeNode.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Call typeCheck() on all child syntax tree nodes.
 * @param stable The compiler/parser's symbol table
 */
protected Type typeCheckContents(SymbolTable stable) throws TypeCheckError {
    final int n = elementCount();
    for (int i = 0; i < n; i++) {
        SyntaxTreeNode item = (SyntaxTreeNode)_contents.elementAt(i);
        item.typeCheck(stable);
    }
    return Type.Void;
}
 
Example 10
Source File: If.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Type-check the "test" expression and contents of this element.
 * The contents will be ignored if we know the test will always fail.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    // Type-check the "test" expression
    if (_test.typeCheck(stable) instanceof BooleanType == false) {
        _test = new CastExpr(_test, Type.Boolean);
    }
    // Type check the element contents
    if (!_ignore) {
        typeCheckContents(stable);
    }
    return Type.Void;
}
 
Example 11
Source File: TransletOutput.java    From jdk8u60 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 12
Source File: ApplyImports.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 * Type-check the attributes/contents of an <xsl:apply-imports/> element.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    typeCheckContents(stable);              // with-params
    return Type.Void;
}
 
Example 13
Source File: ProcessingInstruction.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _name.typeCheck(stable);
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 14
Source File: DecimalFormatting.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * No type check needed for the <xsl:decimal-formatting/> element
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    return Type.Void;
}
 
Example 15
Source File: Include.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    return Type.Void;
}
 
Example 16
Source File: LiteralAttribute.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _value.typeCheck(stable);
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 17
Source File: UseAttributeSets.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Do nada.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    return Type.Void;
}
 
Example 18
Source File: ProcessingInstruction.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    _name.typeCheck(stable);
    typeCheckContents(stable);
    return Type.Void;
}
 
Example 19
Source File: Include.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    return Type.Void;
}
 
Example 20
Source File: UseAttributeSets.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Do nada.
 */
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
    return Type.Void;
}