本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type.ResultTree方法的典型用法代码示例。如果您正苦于以下问题:Java Type.ResultTree方法的具体用法?Java Type.ResultTree怎么用?Java Type.ResultTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type
的用法示例。
在下文中一共展示了Type.ResultTree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; //导入方法依赖的package包/类
/**
* Runs a type check on either the variable element body or the
* expression in the 'select' attribute
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
// Type check the 'select' expression if present
if (_select != null) {
_type = _select.typeCheck(stable);
}
// Type check the element contents otherwise
else if (hasContents()) {
typeCheckContents(stable);
_type = Type.ResultTree;
}
else {
_type = Type.Reference;
}
// The return type is void as the variable element does not leave
// anything on the JVM's stack. The '_type' global will be returned
// by the references to this variable, and not by the variable itself.
return Type.Void;
}
示例2: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type; //导入方法依赖的package包/类
/**
* Type checking a cast expression amounts to verifying that the
* type conversion is legal. Cast expressions are created during
* type checking, but typeCheck() is usually not called on them.
* As a result, this method is called from the constructor.
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
Type tleft = _left.getType();
if (tleft == null) {
tleft = _left.typeCheck(stable);
}
if (tleft instanceof NodeType) {
tleft = Type.Node; // multiple instances
}
else if (tleft instanceof ResultTreeType) {
tleft = Type.ResultTree; // multiple instances
}
if (InternalTypeMap.maps(tleft, _type) != null) {
return _type;
}
// throw new TypeCheckError(this);
throw new TypeCheckError(new ErrorMsg(
ErrorMsg.DATA_CONVERSION_ERR, tleft.toString(), _type.toString()));
}