Package org.xulfaces.annotation.faces

Examples of org.xulfaces.annotation.faces.COMPONENT


   
    for (TypeDeclaration typeDeclaration : apEnv.getTypeDeclarations()) {
      try {
        Class currentClass = Class.forName(typeDeclaration.getQualifiedName());
        log.debug("Processing " + currentClass.getName() + " -->");
        COMPONENT componentAnnotation = typeDeclaration.getAnnotation(COMPONENT.class);
        if( (componentAnnotation != null&& (componentAnnotation.process())){
          Component component = new Component(componentAnnotation,currentClass);
          processComponentAnnotation(component, currentClass);
        }
        RENDERER rendererAnnotation = typeDeclaration.getAnnotation(RENDERER.class);
        if (rendererAnnotation != null) {
View Full Code Here


    for (TypeDeclaration typeDeclaration : apEnv.getTypeDeclarations()) {
      try {
        Class currentClass = Class.forName(typeDeclaration.getQualifiedName());

        COMPONENT componentAnnotation = typeDeclaration.getAnnotation(COMPONENT.class);

        if (componentAnnotation != null) {
          String sourceCode = "";
          try {
            String name = currentClass.getName();
            name = "src/main/java/" + name.replace(".", "/") + ".java";
            log.debug(name);
            BufferedReader bufferedReader = new BufferedReader(new FileReader(name));
            String line = null;
            while ((line = bufferedReader.readLine()) != null) {
              sourceCode = sourceCode + line + "\n";
            }
            bufferedReader.close();
          } catch (Exception e) {
            log.error(e);
            throw new RuntimeException(e);
          }

          if (log.isDebugEnabled()) {
            log.debug(sourceCode);
          }

          if (sourceCode != null) {
            boolean containsGenerationTags = false;
            LineNumberReader sourceFileReader = new LineNumberReader(new StringReader(sourceCode));
            StringBuffer sourceCodeBuffer = new StringBuffer();
            log.debug("Line number " + sourceFileReader.getLineNumber());
            String line = null;
            boolean startGeneration = false;
            while ((line = sourceFileReader.readLine()) != null) {
              if (line.contains("@StartGeneration")) {
                sourceCodeBuffer.append(line);
                sourceCodeBuffer.append("\n");
                startGeneration = true;
                containsGenerationTags = true;
                log.debug("Processing COMPONENT " + componentAnnotation.classname());
                Component component = new Component(componentAnnotation, currentClass);
                sourceCodeBuffer.append(processComponentAnnotation(component, currentClass));
              }
              else {
                if(startGeneration){
View Full Code Here

TOP

Related Classes of org.xulfaces.annotation.faces.COMPONENT

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.