Ejemplo n.º 1
0
  /** Dump for debug purposes */
  public void dump(IndentingPrintWriter out) {
    out.println(name + " {");
    out.indent();

    for (InnerClass ic : innerClasses) {
      ic.dump(out);
    }

    out.unindent();
    out.println("}");
  }
Ejemplo n.º 2
0
  /** @see org.apache.tools.ant.Task#execute() */
  @Override
  public void execute() throws BuildException {

    if (dumpFile == null) throw new BuildException("File to dump to is missing");
    ModelFactory fact = new ModelFactory(loader);

    try {
      ClassModel model = fact.modelForName(className);

      FileWriter writer = new FileWriter(dumpFile);
      IndentingPrintWriter ipw = new IndentingPrintWriter(writer);
      model.dump(ipw);
      ipw.flush();
      writer.close();
    } catch (Exception ex) {
      ex.printStackTrace();
      throw new BuildException(ex);
    }
  }
Ejemplo n.º 3
0
 /** Dump for debug purposes */
 public final void dump(IndentingPrintWriter out) {
   out.println(name);
 }