Package org.xulfaces.annotation.taglib

Examples of org.xulfaces.annotation.taglib.TAG


              }             
            }
          }                 
        }       

        TAG tagAnnotation = typeDeclaration.getAnnotation(TAG.class);
        String name = "no name";
        if (tagAnnotation != null) {
          name = tagAnnotation.name();
        }
        log.debug("\ttag name is " + name);                             
        process(currentClass);
        log.debug("tag processed. ");
      } catch (ClassNotFoundException e) {       
View Full Code Here


  }

  private void process(Class currentClass) {

    if (currentClass != Object.class) {
      TAG tagAnnotation = (TAG) currentClass.getAnnotation(TAG.class);
      if(tagAnnotation != null){
        Tag tag = new Tag(tagAnnotation,currentClass);
        tld.getTags().add(tag);
        processFields(currentClass,tag)
      }     
View Full Code Here

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

        TAG tagAnnotation = typeDeclaration.getAnnotation(TAG.class);

        if (tagAnnotation != 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 (sourceCode != null) {
            boolean containsGenerationTags = false;
            LineNumberReader sourceFileReader = new LineNumberReader(new StringReader(sourceCode));
            StringBuffer sourceCodeBuffer = new StringBuffer();           
            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;
               
                if (log.isDebugEnabled()) {
                  log.debug("Processing TAG " + tagAnnotation.name());
                }
               
                Tag tag = new Tag(tagAnnotation, currentClass);
                sourceCodeBuffer.append(processTagAnnotation(tag, currentClass));
              }
View Full Code Here

TOP

Related Classes of org.xulfaces.annotation.taglib.TAG

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.