1 23 24 29 30 package com.sun.enterprise.tools.verifier.apiscan.stdapis; 31 32 import java.util.Collection ; 33 import java.util.Iterator ; 34 import java.util.logging.Logger ; 35 36 import com.sun.enterprise.tools.verifier.apiscan.classfile.ClassFileLoader; 37 import com.sun.enterprise.tools.verifier.apiscan.classfile.ClosureCompilerImpl; 38 39 42 public class WebClosureCompiler extends ClosureCompilerImpl { 43 private static Logger logger = Logger.getLogger("apiscan.stdapis"); private static final String myClassName = "WebClosureCompiler"; private String specVersion; 46 47 public WebClosureCompiler(String specVersion, ClassFileLoader cfl) { 48 super(cfl); 49 logger.entering(myClassName, "init<>", specVersion); this.specVersion = specVersion; 51 addStandardAPIs(); 52 } 53 54 protected void addStandardAPIs() { 56 String apiName = "web_app_" + specVersion; Collection classes = APIRepository.Instance().getClassesFor(apiName); 58 for (Iterator i = classes.iterator(); i.hasNext();) { 59 addExcludedClass((String ) i.next()); 60 } 61 Collection pkgs = APIRepository.Instance().getPackagesFor(apiName); 62 for (Iterator i = pkgs.iterator(); i.hasNext();) { 63 addExcludedPackage((String ) i.next()); 64 } 65 Collection patterns = APIRepository.Instance().getPatternsFor(apiName); 66 for (Iterator i = patterns.iterator(); i.hasNext();) { 67 addExcludedPattern((String ) i.next()); 68 } 69 } 70 } 71 | Popular Tags |