@Override public Types getTypes() { return classParser.getContext().getTypes(); }
@Override public void close() { if (null != parser) { parser.close(); parser = null; } }
public Parser(ParsingContext context) { this.context = context; executorService = (context.executorService==null?createExecutorService():context.executorService); ownES = context.executorService==null; }
protected void initTypes(File file) throws IOException { ParsingContext context = new ParsingContext.Builder().build(); Parser cp = new Parser(context); cp.parse(file, null); try { cp.awaitTermination(); } catch (InterruptedException e) { throw new IOException(e); } types = cp.getContext().getTypes(); }
protected void setParser(Parser parser) { if (parser == null) { // if the passed in parser is null, it means no annotation scanning // has been done yet, we need to construct a new parser // and do the annotation scanning here ParsingContext pc = new ParsingContext.Builder().logger(deplLogger).executorService(getExecutorService()).build(); parser = new Parser(pc); needScanAnnotation = true; } classParser = parser; } }
public Exception[] awaitTermination() throws InterruptedException { return awaitTermination(DEFAULT_TIMEOUT, TimeUnit.SECONDS); }
public void findClassContracts(ClassModel cm, Set<String> interfaces, Set<String> annotationTypeInterfaces) { for (InterfaceModel im : cm.getInterfaces()) { if (isContract(im)) { interfaces.add(im.getName()); } } findContractsFromAnnotations(cm, interfaces, annotationTypeInterfaces); }
public String getName() { if (value!=null) return value.getName(); return name; }
@Override public Collection<URI> getDefiningURIs() { return cur.getDefiningURIs(); }
/** * Build the final ParsingContext with the provided configuration. * * @return the @{link ParsingContext} instance */ public ParsingContext build() { return new ParsingContext(this); }
protected void initTypes(File file) throws IOException { ParsingContext context = new ParsingContext.Builder().build(); Parser cp = new Parser(context); cp.parse(file, null); try { cp.awaitTermination(); } catch (InterruptedException e) { throw new IOException(e); } types = cp.getContext().getTypes(); }
@Override public Types getTypes() { return classParser.getContext().getTypes(); } }
public Exception[] awaitTermination() throws InterruptedException { return awaitTermination(DEFAULT_TIMEOUT, TimeUnit.SECONDS); }
@Override public String getFullyQualifiedClassName() { return cur.getName(); }
@Override public void close() { if (null != parser) { parser.close(); parser = null; } }
/** * Build the final ParsingContext with the provided configuration. * * @return the @{link ParsingContext} instance */ public ParsingContext build() { return new ParsingContext(this); }
public Parser(ParsingContext context) { this.context = context; executorService = (context.executorService==null?createExecutorService():context.executorService); ownES = context.executorService==null; }
public String getName() { if (value!=null) return value.getName(); return name; }