@Override public CharSequence extract(ProcessingEnvironment environment, TypeElement typeElement) throws IOException { if (typeElement instanceof ElementImpl) { Binding binding = ((ElementImpl) typeElement)._binding; if (binding instanceof SourceTypeBinding) { CompilationUnitDeclaration unit = ((SourceTypeBinding) binding).scope.referenceCompilationUnit(); char[] contents = unit.compilationResult.compilationUnit.getContents(); return CharBuffer.wrap(contents); } } return UNABLE_TO_EXTRACT; }
public void reset(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; int produceAttributes = givenClassFile.produceAttributes; this.generateAttributes = produceAttributes; if ((produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } else { this.lineSeparatorPositions = null; } }
public CodeStream(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; this.generateAttributes = givenClassFile.produceAttributes; if ((givenClassFile.produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } } /**
public void reset(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; int produceAttributes = givenClassFile.produceAttributes; this.generateAttributes = produceAttributes; if ((produceAttributes & ClassFileConstants.ATTR_LINES) != 0 && givenClassFile.referenceBinding != null) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } else { this.lineSeparatorPositions = null; } }
public CodeStream(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; this.generateAttributes = givenClassFile.produceAttributes; if ((givenClassFile.produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } } /**
public void reset(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; int produceAttributes = givenClassFile.produceAttributes; this.generateAttributes = produceAttributes; if ((produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } else { this.lineSeparatorPositions = null; } }
public CodeStream(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; this.generateAttributes = givenClassFile.produceAttributes; if ((givenClassFile.produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } } /**
public void reset(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; int produceAttributes = givenClassFile.produceAttributes; this.generateAttributes = produceAttributes; if ((produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } else { this.lineSeparatorPositions = null; } }
public void reset(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; int produceAttributes = givenClassFile.produceAttributes; this.generateAttributes = produceAttributes; if ((produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } else { this.lineSeparatorPositions = null; } }
public void reset(ClassFile givenClassFile) { this.targetLevel = givenClassFile.targetJDK; int produceAttributes = givenClassFile.produceAttributes; this.generateAttributes = produceAttributes; if ((produceAttributes & ClassFileConstants.ATTR_LINES) != 0) { this.lineSeparatorPositions = givenClassFile.referenceBinding.scope.referenceCompilationUnit().compilationResult.getLineSeparatorPositions(); } else { this.lineSeparatorPositions = null; } }
@Override public ProblemReporter problemReporter() { MethodScope outerMethodScope; if ((outerMethodScope = outerMostMethodScope()) == null) { ProblemReporter problemReporter = referenceCompilationUnit().problemReporter; problemReporter.referenceContext = this.referenceContext; return problemReporter; } return outerMethodScope.problemReporter(); }
public ProblemReporter problemReporter() { MethodScope outerMethodScope; if ((outerMethodScope = outerMostMethodScope()) == null) { ProblemReporter problemReporter = referenceCompilationUnit().problemReporter; problemReporter.referenceContext = this.referenceContext; return problemReporter; } return outerMethodScope.problemReporter(); }
public ProblemReporter problemReporter() { MethodScope outerMethodScope; if ((outerMethodScope = outerMostMethodScope()) == null) { ProblemReporter problemReporter = referenceCompilationUnit().problemReporter; problemReporter.referenceContext = this.referenceContext; return problemReporter; } return outerMethodScope.problemReporter(); }
SimpleLookupTable storedAnnotations(boolean forceInitialize) { if (forceInitialize && this.storedAnnotations == null && this.scope != null) { // scope null when no annotation cached, and type got processed fully (159631) this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true; if (!this.scope.environment().globalOptions.storeAnnotations) return null; // not supported during this compile this.storedAnnotations = new SimpleLookupTable(3); } return this.storedAnnotations; } public ReferenceBinding superclass() {
public ProblemReporter problemReporter() { MethodScope outerMethodScope; if ((outerMethodScope = outerMostMethodScope()) == null) { ProblemReporter problemReporter = referenceCompilationUnit().problemReporter; problemReporter.referenceContext = this.referenceContext; return problemReporter; } return outerMethodScope.problemReporter(); }
public ProblemReporter problemReporter() { MethodScope outerMethodScope; if ((outerMethodScope = outerMostMethodScope()) == null) { ProblemReporter problemReporter = referenceCompilationUnit().problemReporter; problemReporter.referenceContext = this.referenceContext; return problemReporter; } return outerMethodScope.problemReporter(); }
public SourceTypeBinding(char[][] compoundName, PackageBinding fPackage, ClassScope scope) { this.compoundName = compoundName; this.fPackage = fPackage; this.fileName = scope.referenceCompilationUnit().getFileName(); this.modifiers = scope.referenceContext.modifiers; this.sourceName = scope.referenceContext.name; this.scope = scope; // expect the fields & methods to be initialized correctly later this.fields = Binding.UNINITIALIZED_FIELDS; this.methods = Binding.UNINITIALIZED_METHODS; computeId(); }
public ProblemReporter problemReporter() { MethodScope outerMethodScope; if ((outerMethodScope = outerMostMethodScope()) == null) { ProblemReporter problemReporter = referenceCompilationUnit().problemReporter; problemReporter.referenceContext = this.referenceContext; return problemReporter; } return outerMethodScope.problemReporter(); }
SimpleLookupTable storedAnnotations(boolean forceInitialize) { if (!isPrototype()) return this.prototype.storedAnnotations(forceInitialize); if (forceInitialize && this.storedAnnotations == null && this.scope != null) { // scope null when no annotation cached, and type got processed fully (159631) this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true; final CompilerOptions globalOptions = this.scope.environment().globalOptions; if (!globalOptions.storeAnnotations) return null; // not supported during this compile this.storedAnnotations = new SimpleLookupTable(3); } return this.storedAnnotations; }
SimpleLookupTable storedAnnotations(boolean forceInitialize) { if (!isPrototype()) return this.prototype.storedAnnotations(forceInitialize); if (forceInitialize && this.storedAnnotations == null && this.scope != null) { // scope null when no annotation cached, and type got processed fully (159631) this.scope.referenceCompilationUnit().compilationResult.hasAnnotations = true; final CompilerOptions globalOptions = this.scope.environment().globalOptions; if (!globalOptions.storeAnnotations) return null; // not supported during this compile this.storedAnnotations = new SimpleLookupTable(3); } return this.storedAnnotations; }