Exemplo n.º 1
0
  public void doWithDynamicMethods(ApplicationContext ctx) {
    try {
      if (pluginBean.isReadableProperty(DO_WITH_DYNAMIC_METHODS)) {
        Closure c = (Closure) plugin.getProperty(DO_WITH_DYNAMIC_METHODS);
        if (enableDocumentationGeneration()) {
          DocumentationContext.getInstance().setActive(true);
        }

        c.setDelegate(this);
        c.call(new Object[] {ctx});
      }
    } finally {
      if (enableDocumentationGeneration()) {
        DocumentationContext.getInstance().reset();
      }
    }
  }
Exemplo n.º 2
0
  public void doWithApplicationContext(ApplicationContext ctx) {
    try {
      if (pluginBean.isReadableProperty(DO_WITH_APPLICATION_CONTEXT)) {
        Closure c = (Closure) plugin.getProperty(DO_WITH_APPLICATION_CONTEXT);
        if (enableDocumentationGeneration()) {
          DocumentationContext.getInstance().setActive(true);
        }

        c.setDelegate(this);
        c.call(new Object[] {ctx});
      }
    } finally {
      if (enableDocumentationGeneration()) {
        DocumentationContext.getInstance().reset();
      }
    }
  }
Exemplo n.º 3
0
 public void doc(String text) {
   if (enableDocumentationGeneration()) {
     DocumentationContext.getInstance().document(text);
   }
 }