Package dk.brics.misc

Examples of dk.brics.misc.Origin


        for (Unit u : mbug) {
          Stmt s = (Stmt) u;
          if (s instanceof JInvokeStmt) {
            JInvokeStmt js = (JInvokeStmt) s;
            if (js.getInvokeExpr().getMethod().getSignature().equals("<dk.brics.xact.XML: void loadXMLSchema(java.lang.String)>")) {
              Origin origin = new Origin(m.getDeclaringClass().getName() + "." + m.getName(), getLineNumber(s), 0);
              String schema = getConstantString(js.getInvokeExpr().getArg(0), origin);
              schema = config.translateSchemaLocation(schema);
              Debug.println(1, true, "Using schema: " + schema);
              schemas.put(schema, origin);
            }
View Full Code Here


   * Returns the current origin.
   */
  public Origin getCurrentOrigin() {
    if (current_origin == null) {
      if (current_class == null || current_method == null)
        return new Origin("???", -1, 0);
      current_origin = new Origin(current_class.getName() + "." + current_method.getName(), current_line, 0);
    }
    return current_origin;
  }
View Full Code Here

   * Returns the origin constant value for the given Soot value.
   * @throws XMLAnalysisException if the value does not appear to be a constant origin
   */
  public Origin getConstantOrigin(Value v) {
    //return getCurrentOrigin();
    return new Origin("???", 0, 0); // TODO: getConstantOrigin
  }
View Full Code Here

      } else if (sig=="<dk.brics.xact.XML: dk.brics.xact.XML parseTemplate(java.lang.String,dk.brics.misc.Origin)>") {
        putConst(context.getConstantString(expr.getArg(0)), context.getConstantOrigin(expr.getArg(1)));
      } else if (sig=="<dk.brics.xact.XML: dk.brics.xact.XML parseTemplateResource(java.lang.Class,java.lang.String)>") {
        String packageName = context.getModifiedPackageNameFromClassConstant(expr.getArg(0));
        String name = context.getConstantString(expr.getArg(1));
        putConst(context.getResourceString(packageName + "/" + name), new Origin(name, 0, 0));
      } else if (sig=="<dk.brics.xact.XML: dk.brics.xact.XML parseTemplateResource(java.lang.String)>") {
        String name = context.getConstantString(expr.getArg(0));
        putConst(context.getResourceString(name), new Origin(name, 0, 0));
      } else if (sig=="<dk.brics.xact.XML: dk.brics.xact.XML plugList(java.lang.String,java.lang.Iterable)>") {
        putPlugList(((InstanceInvokeExpr)expr).getBase(), expr.getArg(0), expr.getArgBox(1));
      } else if (sig=="<dk.brics.xact.XML: dk.brics.xact.XML plug(java.lang.String,java.lang.Object)>") {
        putPlug(((InstanceInvokeExpr)expr).getBase(), expr.getArg(0), expr.getArgBox(1));
      } else if (sig=="<dk.brics.xact.XML: dk.brics.xact.XML plugWrap(java.lang.String,java.lang.Iterable)>") {
View Full Code Here

   
    final Stack<XMLValidationException> errors = new Stack<XMLValidationException>();
   
    public boolean error(ElementNode n, Origin origin, String msg, String example, Origin schema) {
      StringBuilder b = new StringBuilder(msg);
      Origin or;
      if (n != null) {
        String name = n.getName().getShortestExample(true);
        int i1 = name.indexOf('@');
        name = (i1 < 0) ? name : name.substring(0, i1);
        int i2 = name.indexOf('%');
View Full Code Here

        for (Tag tag : tags) {
            if (tag instanceof LineNumberTag) {
                lineNumber = ((LineNumberTag) tag).getLineNumber();
            }
        }
        return new Origin(getSourceFileName(method.getDeclaringClass()),
                lineNumber, 0);
    }
View Full Code Here

TOP

Related Classes of dk.brics.misc.Origin

Copyright © 2018 www.massapicom. 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.