Examples of identicalTo()


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

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

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

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

          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

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

      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

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

  if (ptype != null) {
      for (int i = 0; i < n; i++) {
    final Type argType = (Type) ptype.argsType().elementAt(i);
    final Expression exp = (Expression)_arguments.elementAt(i);
    if (!argType.identicalTo(exp.getType())) {
        try {
      _arguments.setElementAt(new CastExpr(exp, argType), i);
        }
        catch (TypeCheckError e) {
      throw new TypeCheckError(this)// invalid conversion
View Full Code Here

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

  if ((str != null) && (str.equals("yes"))) _escaping = false;
    }

    public Type typeCheck(SymbolTable stable) throws TypeCheckError {
  Type type = _select.typeCheck(stable);
  if ((type != null) && (type.identicalTo(Type.String) == false))
      _select = new CastExpr(_select, Type.String);
  return Type.Void;
    }

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
View Full Code Here

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

  // Parse the second argument - the document URI base
  if (ac == 2) {
      _base = argument(1);
      final Type baseType = _base.typeCheck(stable);
     
      if (baseType.identicalTo(Type.Node)) {
    _base = new CastExpr(_base, Type.NodeSet);
      }
      else if (baseType.identicalTo(Type.NodeSet)) {
    // falls through
      }
View Full Code Here

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

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

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

  // Yes, the operation is supported
  if (haveType != null) {
      // Check if left-hand side operand must be type casted
      Type arg1 = (Type)haveType.argsType().elementAt(0);
      if (!arg1.identicalTo(tleft))
    _left = new CastExpr(_left, arg1);
      // Check if right-hand side operand must be type casted
      Type arg2 = (Type) haveType.argsType().elementAt(1);
      if (!arg2.identicalTo(tright))
    _right = new CastExpr(_right, arg1);
View Full Code Here

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

      Type arg1 = (Type)haveType.argsType().elementAt(0);
      if (!arg1.identicalTo(tleft))
    _left = new CastExpr(_left, arg1);
      // Check if right-hand side operand must be type casted
      Type arg2 = (Type) haveType.argsType().elementAt(1);
      if (!arg2.identicalTo(tright))
    _right = new CastExpr(_right, arg1);
      // Return the result type for the operator we will use
      return _type = haveType.resultType();
  }
  throw new TypeCheckError(this);
View Full Code Here

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

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

  if (!targ.identicalTo(Type.String)) {
      targ.translateTo(classGen, methodGen, Type.String);
  }
    }
}
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.