本文整理汇总了Java中com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType类的典型用法代码示例。如果您正苦于以下问题:Java ReferenceType类的具体用法?Java ReferenceType怎么用?Java ReferenceType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReferenceType类属于com.sun.org.apache.xalan.internal.xsltc.compiler.util包,在下文中一共展示了ReferenceType类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
/**
* Type check a FilterParentPath. If the filter is not a node-set add a
* cast to node-set only if it is of reference type. This type coercion
* is needed for expressions like $x where $x is a parameter reference.
* All optimizations are turned off before type checking underlying
* predicates.
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
Type ptype = _primary.typeCheck(stable);
boolean canOptimize = _primary instanceof KeyCall;
if (ptype instanceof NodeSetType == false) {
if (ptype instanceof ReferenceType) {
_primary = new CastExpr(_primary, Type.NodeSet);
}
else {
throw new TypeCheckError(this);
}
}
// Type check predicates and turn all optimizations off if appropriate
int n = _predicates.size();
for (int i = 0; i < n; i++) {
Predicate pred = (Predicate) _predicates.elementAt(i);
if (!canOptimize) {
pred.dontOptimize();
}
pred.typeCheck(stable);
}
return _type = Type.NodeSet;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:FilterExpr.java
示例2: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
if (_select != null) {
_type = _select.typeCheck(stable);
if (_type instanceof NodeType || _type instanceof ReferenceType) {
_select = new CastExpr(_select, Type.NodeSet);
_type = Type.NodeSet;
}
if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
typeCheckContents(stable); // with-params
return Type.Void;
}
throw new TypeCheckError(this);
}
else {
typeCheckContents(stable); // with-params
return Type.Void;
}
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:ApplyTemplates.java
示例3: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
/**
* 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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:Param.java
示例4: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
_type = _select.typeCheck(stable);
if (_type instanceof ReferenceType || _type instanceof NodeType) {
_select = new CastExpr(_select, Type.NodeSet);
typeCheckContents(stable);
return Type.Void;
}
if (_type instanceof NodeSetType||_type instanceof ResultTreeType) {
typeCheckContents(stable);
return Type.Void;
}
throw new TypeCheckError(this);
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:ForEach.java
示例5: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
/**
* 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;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:WithParam.java
示例6: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
/**
* Type check a FilterParentPath. If the filter is not a node-set add a
* cast to node-set only if it is of reference type. This type coercion is
* needed for expressions like $x/LINE where $x is a parameter reference.
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
final Type ftype = _filterExpr.typeCheck(stable);
if (ftype instanceof NodeSetType == false) {
if (ftype instanceof ReferenceType) {
_filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
}
/*
else if (ftype instanceof ResultTreeType) {
_filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
}
*/
else if (ftype instanceof NodeType) {
_filterExpr = new CastExpr(_filterExpr, Type.NodeSet);
}
else {
throw new TypeCheckError(this);
}
}
// Wrap single node path in a node set
final Type ptype = _path.typeCheck(stable);
if (!(ptype instanceof NodeSetType)) {
_path = new CastExpr(_path, Type.NodeSet);
}
return _type = Type.NodeSet;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:FilterParentPath.java
示例7: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
final Type tselect = _select.typeCheck(stable);
if (tselect instanceof NodeType ||
tselect instanceof NodeSetType ||
tselect instanceof ReferenceType ||
tselect instanceof ResultTreeType) {
// falls through
}
else {
_select = new CastExpr(_select, Type.String);
}
return Type.Void;
}
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:14,代码来源:CopyOf.java
示例8: typeCheck
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType; //导入依赖的package包/类
/**
* 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;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:16,代码来源:WithParam.java
注:本文中的com.sun.org.apache.xalan.internal.xsltc.compiler.util.ReferenceType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论