Package org.apache.xalan.xsltc.compiler.util

Examples of org.apache.xalan.xsltc.compiler.util.Type.identicalTo()


      final Type arg1 = (Type) ptype.argsType().elementAt(0);
      if (!arg1.identicalTo(tleft)) {
    _left = new CastExpr(_left, arg1);
      }
      final Type arg2 = (Type) ptype.argsType().elementAt(1);
      if (!arg2.identicalTo(tright)) {
    _right = new CastExpr(_right, arg1);
      }
      return _type = ptype.resultType();
  }
  throw new TypeCheckError(this);
View Full Code Here


    public Type typeCheck(SymbolTable stable) throws TypeCheckError {
        Type type = _select.typeCheck(stable);

        // Prefer to handle the value as a node; fall back to String, otherwise
        if (type != null && !type.identicalTo(Type.Node)) {
            /***
             *** %HZ% Would like to treat result-tree fragments in the same
             *** %HZ% way as node sets for value-of, but that's running into
             *** %HZ% some snags.  Instead, they'll be converted to String
            if (type.identicalTo(Type.ResultTree)) {
View Full Code Here

            if (type.identicalTo(Type.ResultTree)) {
                _select = new CastExpr(new CastExpr(_select, Type.NodeSet),
                                       Type.Node);
            } else
            ***/
            if (type.identicalTo(Type.NodeSet)) {
                _select = new CastExpr(_select, Type.Node);
            } else {
                _isString = true;
                if (!type.identicalTo(Type.String)) {
                    _select = new CastExpr(_select, Type.String);
View Full Code Here

            ***/
            if (type.identicalTo(Type.NodeSet)) {
                _select = new CastExpr(_select, Type.Node);
            } else {
                _isString = true;
                if (!type.identicalTo(Type.String)) {
                    _select = new CastExpr(_select, Type.String);
                }
                _isString = true;
            }
        }
View Full Code Here

      arg.translate(classGen, methodGen);
      arg.startResetIterator(classGen, methodGen);
      targ = arg.getType();
  }

  if (!targ.identicalTo(Type.Real)) {
      targ.translateTo(classGen, methodGen, Type.Real);
  }
    }
}
View Full Code Here

                throw new TypeCheckError(msg);
            }

            final Type arg2Type = _arg2.typeCheck(stable);

            if (arg2Type.identicalTo(Type.Node)) {
                _arg2 = new CastExpr(_arg2, Type.NodeSet);
            } else if (arg2Type.identicalTo(Type.NodeSet)) {
                // falls through
            } else {
                ErrorMsg msg = new ErrorMsg(ErrorMsg.DOCUMENT_ARG_ERR, this);
View Full Code Here

            final Type arg2Type = _arg2.typeCheck(stable);

            if (arg2Type.identicalTo(Type.Node)) {
                _arg2 = new CastExpr(_arg2, Type.NodeSet);
            } else if (arg2Type.identicalTo(Type.NodeSet)) {
                // falls through
            } else {
                ErrorMsg msg = new ErrorMsg(ErrorMsg.DOCUMENT_ARG_ERR, this);
                throw new TypeCheckError(msg);
            }
View Full Code Here

    }

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  _arg.translate(classGen, methodGen);
  final Type targ = _arg.getType();
  if (!targ.identicalTo(Type.Boolean)) {
      _arg.startResetIterator(classGen, methodGen);
      targ.translateTo(classGen, methodGen, Type.Boolean);
  }
    }
}
View Full Code Here

          new MethodType(Type.Void,
                   tleft, tright));

  if (ptype != null) {
      Type arg1 = (Type) ptype.argsType().elementAt(0);
      if (!arg1.identicalTo(tleft)) {
    _left = new CastExpr(_left, arg1);
      }
      Type arg2 = (Type) ptype.argsType().elementAt(1);
      if (!arg2.identicalTo(tright)) {
    _right = new CastExpr(_right, arg1);       
View Full Code Here

      Type arg1 = (Type) ptype.argsType().elementAt(0);
      if (!arg1.identicalTo(tleft)) {
    _left = new CastExpr(_left, arg1);
      }
      Type arg2 = (Type) ptype.argsType().elementAt(1);
      if (!arg2.identicalTo(tright)) {
    _right = new CastExpr(_right, arg1);       
      }
      return _type = ptype.resultType();
  }
  throw new TypeCheckError(this);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.