Package net.sf.gluebooster.java.booster.basic.meta

Examples of net.sf.gluebooster.java.booster.basic.meta.ObjectAnalyzer


   * @param newCommentText the new value
   */
  @SuppressWarnings("rawtypes")
  public static void setCommentText(Doc doc, String newCommentText) throws Exception{
   
      ObjectAnalyzer analyzer = new ObjectAnalyzer(doc);
      Object comment = analyzer.getPrivateField("comment");
      if (comment != null){
        ObjectAnalyzer commentanalyzer = new ObjectAnalyzer(comment);
        commentanalyzer.setPrivateField("text", newCommentText);
      } else {
        doc.setRawCommentText(newCommentText);
        comment = doc.commentText();
       
      }
View Full Code Here


    // replace the messager to avoid unnecessary warnings

    try {

      ObjectAnalyzer analyzer = new ObjectAnalyzer(docEnvContainer);
      DocEnv docEnv = (DocEnv) analyzer.getPrivateField("env");
      ObjectAnalyzer<DocEnv> docEnvAnalyzer = new ObjectAnalyzer<DocEnv>(
          docEnv);
      messager = docEnvAnalyzer.getPrivateField("messager");
      ObjectAnalyzer<Messager> messagerAnalyzer = new ObjectAnalyzer<Messager>(
          messager);
View Full Code Here

   *            container of the current messager
   */
  public static void replaceMessageWriters(Writer newWriter, RootDoc root)
      throws Exception {
    Messager messager = replaceMessager(root, null);
    ObjectAnalyzer analyzer = new ObjectAnalyzer(messager);
    ArrayList<PrintWriter> writers = new ArrayList<PrintWriter>();
    writers.add((PrintWriter) analyzer.getPrivateField("warnWriter"));
    writers.add((PrintWriter) analyzer.getPrivateField("errWriter"));
    writers.add((PrintWriter) analyzer.getPrivateField("noticeWriter"));

    for (PrintWriter writer : writers) {
      new ObjectAnalyzer(writer).setPrivateField("out", newWriter);
    }

    replaceMessager(root, messager);
  }
View Full Code Here

TOP

Related Classes of net.sf.gluebooster.java.booster.basic.meta.ObjectAnalyzer

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.