public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope) { traverse(visitor, unitScope, true); } public void traverse(ASTVisitor visitor, CompilationUnitScope unitScope, boolean skipOnError) {
protected void buildModel(CompilationUnitDeclaration[] units) { JDTTreeBuilder builder = new JDTTreeBuilder(factory); List<CompilationUnitDeclaration> unitList = this.sortCompilationUnits(units); forEachCompilationUnit(unitList, SpoonProgress.Process.MODEL, unit -> { // we need first to go through the whole model before getting the right reference for imports unit.traverse(builder, unit.scope); }); if (getFactory().getEnvironment().isAutoImports()) { //we need first imports before we can place comments. Mainly comments on imports need that forEachCompilationUnit(unitList, SpoonProgress.Process.IMPORT, unit -> { new JDTImportBuilder(unit, factory).build(); }); } if (getFactory().getEnvironment().isCommentsEnabled()) { forEachCompilationUnit(unitList, SpoonProgress.Process.COMMENT_LINKING, unit -> { new JDTCommentBuilder(unit, factory).build(); }); } }
private void analyze(CompilationUnitDeclaration unit) { if (processedFiles.contains(unit)) { // The code to process all roots seems to hit some of the same classes // repeatedly... so filter these out manually return; } processedFiles.add(unit); AnnotationVisitor visitor = new AnnotationVisitor(); unit.traverse(visitor, unit.scope); }
private void analyze(CompilationUnitDeclaration unit) { if (processedFiles.contains(unit)) { // The code to process all roots seems to hit some of the same classes // repeatedly... so filter these out manually return; } processedFiles.add(unit); AnnotationVisitor visitor = new AnnotationVisitor(); unit.traverse(visitor, unit.scope); }
public TypedefCollector( @NonNull Collection<CompilationUnitDeclaration> units, boolean requireHide, boolean requireSourceRetention) { mRequireHide = requireHide; mRequireSourceRetention = requireSourceRetention; for (CompilationUnitDeclaration unit : units) { mCurrentUnit = unit; unit.traverse(this, unit.scope); mCurrentUnit = null; } }
public TypedefCollector( @NonNull Collection<CompilationUnitDeclaration> units, boolean requireHide, boolean requireSourceRetention) { mRequireHide = requireHide; mRequireSourceRetention = requireSourceRetention; for (CompilationUnitDeclaration unit : units) { mCurrentUnit = unit; unit.traverse(this, unit.scope); mCurrentUnit = null; } }
public RoundEnvImpl(CompilationUnitDeclaration[] units, ReferenceBinding[] binaryTypeBindings, boolean isLastRound, BaseProcessingEnvImpl env) { _processingEnv = env; _isLastRound = isLastRound; _units = units; _factory = _processingEnv.getFactory(); // Discover the annotations that will be passed to Processor.process() AnnotationDiscoveryVisitor visitor = new AnnotationDiscoveryVisitor(_processingEnv); if (_units != null) { for (CompilationUnitDeclaration unit : _units) { unit.traverse(visitor, unit.scope); } } _annoToUnit = visitor._annoToElement; if (binaryTypeBindings != null) collectAnnotations(binaryTypeBindings); _binaryTypes = binaryTypeBindings; }
static class IntArrayList { public int[] list = new int[5]; public int length = 0; public void add(int i) { if (this.list.length == this.length) { System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length); } this.list[this.length++] = i; } }
static class IntArrayList { public int[] list = new int[5]; public int length = 0; public void add(int i) { if (this.list.length == this.length) { System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length); } this.list[this.length++] = i; } }
static class IntArrayList { public int[] list = new int[5]; public int length = 0; public void add(int i) { if (this.list.length == this.length) { System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length); } this.list[this.length++] = i; } }
static class IntArrayList { public int[] list = new int[5]; public int length = 0; public void add(int i) { if (this.list.length == this.length) { System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length); } this.list[this.length++] = i; } }
static class IntArrayList { public int[] list = new int[5]; public int length = 0; public void add(int i) { if (this.list.length == this.length) { System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length); } this.list[this.length++] = i; } }
static class IntArrayList { public int[] list = new int[5]; public int length = 0; public void add(int i) { if (this.list.length == this.length) { System.arraycopy(this.list, 0, this.list = new int[this.length*2], 0, this.length); } this.list[this.length++] = i; } }