Replay JDT's Bug 528108 - Add @Override to jdt.core
diff --git a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/BuildJarIndex.java b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/BuildJarIndex.java
index fcb9685..0afa9e2 100644
--- a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/BuildJarIndex.java
+++ b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/BuildJarIndex.java
@@ -37,6 +37,7 @@
private String jarPath;
private String indexPath;
+ @Override
public void execute() throws BuildException {
if (this.jarPath == null) {
throw new BuildException(AntAdapterMessages.getString("buildJarIndex.jarFile.cannot.be.null")); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/CheckDebugAttributes.java b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/CheckDebugAttributes.java
index 0947c64..07d382a 100644
--- a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/CheckDebugAttributes.java
+++ b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/CheckDebugAttributes.java
@@ -43,6 +43,7 @@
private String file;
private String property;
+ @Override
public void execute() throws BuildException {
if (this.file == null) {
throw new BuildException(AntAdapterMessages.getString("checkDebugAttributes.file.argument.cannot.be.null")); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
index 507f55d..9faaa09 100644
--- a/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
+++ b/org.eclipse.jdt.core/antadapter/org/eclipse/jdt/core/JDTCompilerAdapter.java
@@ -68,6 +68,7 @@
* @throws BuildException if anything wrong happen during the compilation
* @return boolean true if the compilation is ok, false otherwise
*/
+ @Override
public boolean execute() throws BuildException {
this.attributes.log(AntAdapterMessages.getString("ant.jdtadapter.info.usingJDTCompiler"), Project.MSG_VERBOSE); //$NON-NLS-1$
Commandline cmd = setupJavacCommand();
@@ -91,6 +92,7 @@
}
+ @Override
protected Commandline setupJavacCommand() throws BuildException {
Commandline cmd = new Commandline();
this.customDefaultOptions = new CompilerOptions().getMap();
@@ -510,6 +512,7 @@
*
* @param cmd the given command line
*/
+ @Override
protected void logAndAddFilesToCompile(Commandline cmd) {
this.attributes.log("Compilation " + cmd.describeArguments(), //$NON-NLS-1$
Project.MSG_VERBOSE);
@@ -535,6 +538,7 @@
//we need the directories sorted, longest first,since sub directories can
//override encodings for their parent directories
Comparator comparator = new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
return ((String) o2).length() - ((String) o1).length();
}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/BasicModule.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/BasicModule.java
index 663f7cb..924ab5e 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/BasicModule.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/BasicModule.java
@@ -43,6 +43,7 @@
public char[][] with() {
return this.with;
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("provides"); //$NON-NLS-1$
@@ -185,6 +186,7 @@
public boolean isOpen() {
return this.isOpen;
}
+ @Override
public void addReads(char[] modName) {
Predicate<char[]> shouldAdd = m -> {
return Stream.of(this.requires).map(ref -> ref.name()).noneMatch(n -> CharOperation.equals(modName, n));
@@ -197,6 +199,7 @@
this.requires[len] = info;
}
}
+ @Override
public void addExports(IModule.IPackageExport[] toAdd) {
Predicate<char[]> shouldAdd = m -> {
return Stream.of(this.exports).map(ref -> ((PackageExportImpl) ref).pack).noneMatch(n -> CharOperation.equals(m, n));
@@ -215,6 +218,7 @@
ArrayList::addAll);
this.exports = merged.toArray(new PackageExportImpl[merged.size()]);
}
+ @Override
public boolean equals(Object o) {
if (this == o)
return true;
@@ -234,6 +238,7 @@
result = 31 * result + c;
return result;
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer(getClass().getName());
toStringContent(buffer);
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java
index 6ee0e41..9fdf120 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathDirectory.java
@@ -115,6 +115,7 @@
return true;
return false;
}
+@Override
public List fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter) {
return null;
}
@@ -193,9 +194,11 @@
}
return false;
}
+@Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) {
return findClass(typeName, qualifiedPackageName, moduleName, qualifiedBinaryFileName, false);
}
+@Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) {
if (File.separatorChar == '/')
return findClassInternal(typeName, qualifiedPackageName, qualifiedBinaryFileName, asBinaryOnly);
@@ -261,6 +264,7 @@
}
+@Override
public char[][][] findTypeNames(String qualifiedPackageName, String moduleName) {
if (!isPackage(qualifiedPackageName, moduleName)) {
return null; // most common case
@@ -270,6 +274,7 @@
return null;
}
String[] listFiles = dir.list(new FilenameFilter() {
+ @Override
public boolean accept(File directory1, String name) {
String fileName = name.toLowerCase();
return fileName.endsWith(".class") || fileName.endsWith(".java"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -296,9 +301,11 @@
}
return result;
}
+@Override
public void initialize() throws IOException {
// nothing to do
}
+@Override
public char[][] getModulesDeclaringPackage(String qualifiedPackageName, /*@Nullable*/String moduleName) {
String qp2 = File.separatorChar == '/' ? qualifiedPackageName : qualifiedPackageName.replace('/', File.separatorChar);
return singletonModuleNameIf(directoryList(qp2) != null);
@@ -316,6 +323,7 @@
}
return false;
}
+@Override
public boolean hasCUDeclaringPackage(String qualifiedPackageName, Function<CompilationUnit, String> pkgNameExtractor) {
String qp2 = File.separatorChar == '/' ? qualifiedPackageName : qualifiedPackageName.replace('/', File.separatorChar);
return Stream.of(directoryList(qp2)).anyMatch(entry -> {
@@ -334,12 +342,15 @@
return hasDeclaration;
});
}
+@Override
public void reset() {
this.directoryCache = new Hashtable(11);
}
+@Override
public String toString() {
return "ClasspathDirectory " + this.path; //$NON-NLS-1$
}
+@Override
public char[] normalizedPath() {
if (this.normalizedPath == null) {
this.normalizedPath = this.path.toCharArray();
@@ -349,12 +360,15 @@
}
return this.normalizedPath;
}
+@Override
public String getPath() {
return this.path;
}
+@Override
public int getMode() {
return this.mode;
}
+@Override
public IModule getModule() {
if (this.isAutoModule && this.module == null) {
return this.module = IModule.createAutomatic(this.path, false, null/*no manifest*/);
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java
index 93b4610..8ba96a1 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJar.java
@@ -59,6 +59,7 @@
this.closeZipFileAtEnd = closeZipFileAtEnd;
}
+@Override
public List<Classpath> fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter) {
// expected to be called once only - if multiple calls desired, consider
// using a cache
@@ -104,9 +105,11 @@
}
}
}
+@Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) {
return findClass(typeName, qualifiedPackageName, moduleName, qualifiedBinaryFileName, false);
}
+@Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) {
if (!isPackage(qualifiedPackageName, moduleName))
return null; // most common case
@@ -155,6 +158,7 @@
public boolean hasAnnotationFileFor(String qualifiedTypeName) {
return this.zipFile.getEntry(qualifiedTypeName+ExternalAnnotationProvider.ANNOTATION_FILE_SUFFIX) != null;
}
+@Override
public char[][][] findTypeNames(final String qualifiedPackageName, String moduleName) {
if (!isPackage(qualifiedPackageName, moduleName))
return null; // most common case
@@ -189,6 +193,7 @@
return null;
}
+@Override
public void initialize() throws IOException {
if (this.zipFile == null) {
this.zipFile = new ZipFile(this.file);
@@ -223,6 +228,7 @@
last = packageName.lastIndexOf('/');
}
}
+@Override
public synchronized char[][] getModulesDeclaringPackage(String qualifiedPackageName, String moduleName) {
if (this.packageCache != null)
return singletonModuleNameIf(this.packageCache.contains(qualifiedPackageName));
@@ -251,6 +257,7 @@
}
return false;
}
+@Override
public void reset() {
if (this.closeZipFileAtEnd) {
if (this.zipFile != null) {
@@ -273,9 +280,11 @@
this.packageCache = null;
this.annotationPaths = null;
}
+@Override
public String toString() {
return "Classpath for jar file " + this.file.getPath(); //$NON-NLS-1$
}
+@Override
public char[] normalizedPath() {
if (this.normalizedPath == null) {
String path2 = this.getPath();
@@ -287,6 +296,7 @@
}
return this.normalizedPath;
}
+@Override
public String getPath() {
if (this.path == null) {
try {
@@ -298,10 +308,12 @@
}
return this.path;
}
+@Override
public int getMode() {
return BINARY;
}
+@Override
public IModule getModule() {
if (this.isAutoModule && this.module == null) {
Manifest manifest = null;
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247.java
index 69f9a6a..d6ea027 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJep247.java
@@ -40,12 +40,15 @@
this.release = release;
this.file = jdkHome;
}
+ @Override
public List<Classpath> fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter) {
return null;
}
+ @Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) {
return findClass(typeName, qualifiedPackageName, moduleName, qualifiedBinaryFileName, false);
}
+ @Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) {
if (!isPackage(qualifiedPackageName, moduleName))
return null; // most common case
@@ -82,11 +85,13 @@
public boolean hasAnnotationFileFor(String qualifiedTypeName) {
return false;
}
+ @Override
public char[][][] findTypeNames(final String qualifiedPackageName, String moduleName) {
// TODO: Revisit
return null;
}
+ @Override
public void initialize() throws IOException {
if (this.release == null) {
return;
@@ -119,6 +124,7 @@
return;
this.packageCache.add(packageName);
}
+ @Override
public synchronized char[][] getModulesDeclaringPackage(String qualifiedPackageName, String moduleName) {
// Ignore moduleName as this has nothing to do with modules (as of now)
if (this.packageCache != null)
@@ -173,6 +179,7 @@
// TOOD: Revisit
return false;
}
+ @Override
public void reset() {
try {
this.fs.close();
@@ -180,9 +187,11 @@
// Move on
}
}
+ @Override
public String toString() {
return "Classpath for JEP 247 for JDK " + this.file.getPath(); //$NON-NLS-1$
}
+ @Override
public char[] normalizedPath() {
if (this.normalizedPath == null) {
String path2 = this.getPath();
@@ -194,6 +203,7 @@
}
return this.normalizedPath;
}
+ @Override
public String getPath() {
if (this.path == null) {
try {
@@ -205,10 +215,12 @@
}
return this.path;
}
+ @Override
public int getMode() {
return BINARY;
}
+ @Override
public IModule getModule() {
return null;
}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJrt.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJrt.java
index d8830a1..e9f25f4 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJrt.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathJrt.java
@@ -56,9 +56,11 @@
this.modulePathMap = new HashMap<>();
}
+ @Override
public List fetchLinkedJars(FileSystem.ClasspathSectionProblemReporter problemReporter) {
return null;
}
+ @Override
public char[][] getModulesDeclaringPackage(String qualifiedPackageName, String moduleName) {
List<String> modules = JRTUtil.getModulesDeclaringPackage(this.file, qualifiedPackageName, moduleName);
return CharOperation.toCharArrays(modules);
@@ -67,9 +69,11 @@
public boolean hasCompilationUnit(String qualifiedPackageName, String moduleName) {
return JRTUtil.hasCompilationUnit(this.file, qualifiedPackageName, moduleName);
}
+ @Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName) {
return findClass(typeName, qualifiedPackageName, moduleName, qualifiedBinaryFileName, false);
}
+ @Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) {
if (!isPackage(qualifiedPackageName, moduleName))
return null; // most common case
@@ -114,6 +118,7 @@
public boolean hasAnnotationFileFor(String qualifiedTypeName) {
return false; // TODO(SHMOD): implement
}
+ @Override
public char[][][] findTypeNames(final String qualifiedPackageName, final String moduleName) {
if (!isPackage(qualifiedPackageName, moduleName))
return null; // most common case
@@ -179,6 +184,7 @@
typeName.toCharArray()));
}
}
+ @Override
public void initialize() throws IOException {
loadModules();
}
@@ -255,6 +261,7 @@
Map<String, IModule> cache = ModulesCache.get(this.file.getPath());
return selectModules(cache.keySet(), limitModule, getModule);
}
+ @Override
protected <T> List<String> allModules(Iterable<T> allSystemModules, Function<T,String> getModuleName, Function<T,IModule> getModule) {
List<String> result = new ArrayList<>();
boolean hasJavaDotSE = false;
@@ -330,6 +337,7 @@
// }
// return this.packageCache.contains(qualifiedPackageName);
// }
+ @Override
public void reset() {
if (this.closeZipFileAtEnd) {
if (this.annotationZipFile != null) {
@@ -346,9 +354,11 @@
this.annotationPaths = null;
}
}
+ @Override
public String toString() {
return "Classpath for JRT System " + this.file.getPath(); //$NON-NLS-1$
}
+ @Override
public char[] normalizedPath() {
if (this.normalizedPath == null) {
String path2 = this.getPath();
@@ -360,6 +370,7 @@
}
return this.normalizedPath;
}
+ @Override
public String getPath() {
if (this.path == null) {
try {
@@ -371,6 +382,7 @@
}
return this.path;
}
+ @Override
public int getMode() {
return BINARY;
}
@@ -378,6 +390,7 @@
public boolean hasModule() {
return true;
}
+ @Override
public IModule getModule(char[] moduleName) {
Map<String, IModule> modules = ModulesCache.get(this.file.getPath());
if (modules != null) {
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java
index 2f0189d..db509ba 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathLocation.java
@@ -83,6 +83,7 @@
public int getMode() {
return SOURCE | BINARY;
}
+ @Override
public int hashCode() {
final int prime = 31;
int result = 1;
@@ -90,6 +91,7 @@
result = prime * result + ((this.path == null) ? 0 : this.path.hashCode());
return result;
}
+ @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -109,13 +111,16 @@
return false;
return true;
}
+ @Override
public String getPath() {
return this.path;
}
+ @Override
public String getDestinationPath() {
return this.destinationPath;
}
+ @Override
public void acceptModule(IModule mod) {
this.module = mod;
this.isAutoModule = mod.isAutomatic();
@@ -173,6 +178,7 @@
return result;
}
+ @Override
public boolean isPackage(String qualifiedPackageName, String moduleName) {
return getModulesDeclaringPackage(qualifiedPackageName, moduleName) != null;
}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java
index 5830233..4d4f2b6 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/ClasspathSourceJar.java
@@ -29,6 +29,7 @@
this.encoding = encoding;
}
+ @Override
public NameEnvironmentAnswer findClass(char[] typeName, String qualifiedPackageName, String moduleName, String qualifiedBinaryFileName, boolean asBinaryOnly) {
if (!isPackage(qualifiedPackageName, moduleName))
return null; // most common case
@@ -61,6 +62,7 @@
return null;
}
+ @Override
public int getMode() {
return SOURCE;
}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/CompilationUnit.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/CompilationUnit.java
index adf0780..bb567d5 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/CompilationUnit.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/CompilationUnit.java
@@ -76,6 +76,7 @@
this.destinationPath = destinationPath;
this.ignoreOptionalProblems = ignoreOptionalProblems;
}
+@Override
public char[] getContents() {
if (this.contents != null)
return this.contents; // answer the cached source
@@ -91,18 +92,23 @@
/**
* @see org.eclipse.jdt.internal.compiler.env.IDependent#getFileName()
*/
+@Override
public char[] getFileName() {
return this.fileName;
}
+@Override
public char[] getMainTypeName() {
return this.mainTypeName;
}
+@Override
public char[][] getPackageName() {
return null;
}
+@Override
public boolean ignoreOptionalProblems() {
return this.ignoreOptionalProblems;
}
+@Override
public String toString() {
return "CompilationUnit[" + new String(this.fileName) + "]"; //$NON-NLS-2$ //$NON-NLS-1$
}
@@ -127,6 +133,7 @@
}
return rootEnvironment.UnNamedModule;
}
+@Override
public String getDestinationPath() {
return this.destinationPath;
}
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
index ead6aa4..588e5e6 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/FileSystem.java
@@ -372,6 +372,7 @@
this.moduleLocations.put(String.valueOf(iModule.name()), this.classpaths[i]);
}
}
+@Override
public void cleanup() {
for (int i = 0, max = this.classpaths.length; i < max; i++)
this.classpaths[i].reset();
@@ -479,6 +480,7 @@
return suggestedAnswer;
}
+@Override
public NameEnvironmentAnswer findType(char[][] compoundName, char[] moduleName) {
if (compoundName != null)
return findClass(
@@ -531,6 +533,7 @@
return result;
}
+@Override
public NameEnvironmentAnswer findType(char[] typeName, char[][] packageName, char[] moduleName) {
if (typeName != null)
return findClass(
@@ -541,6 +544,7 @@
return null;
}
+@Override
public char[][] getModulesDeclaringPackage(char[][] parentPackageName, char[] packageName, char[] moduleName) {
String qualifiedPackageName = new String(CharOperation.concatWith(parentPackageName, packageName, '/'));
String moduleNameString = String.valueOf(moduleName);
diff --git a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
index 06a6378..256b907 100644
--- a/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -782,6 +782,7 @@
final Set<Map.Entry<String, String>> entriesSet = options.entrySet();
Map.Entry<String, String>[] entries = entriesSet.toArray(new Map.Entry[entriesSet.size()]);
Arrays.sort(entries, new Comparator<Map.Entry<String, String>>() {
+ @Override
public int compare(Map.Entry<String, String> o1, Map.Entry<String, String> o2) {
Map.Entry<String, String> entry1 = o1;
Map.Entry<String, String> entry2 = o2;
@@ -1514,6 +1515,7 @@
}
public static File[][] getLibrariesFiles(File[] files) {
FilenameFilter filter = new FilenameFilter() {
+ @Override
public boolean accept(File dir, String name) {
return Util.archiveFormat(name) > -1;
}
@@ -3501,12 +3503,15 @@
// passes the initial set of files to the batch oracle (to avoid finding more than once the same units when case insensitive match)
return new IErrorHandlingPolicy() {
+ @Override
public boolean proceedOnErrors() {
return Main.this.proceedOnError; // stop if there are some errors
}
+ @Override
public boolean stopOnFirstError() {
return false;
}
+ @Override
public boolean ignoreAllErrors() {
return false;
}
@@ -3712,9 +3717,11 @@
HashMap<String, Classpath> knownNames = new HashMap<>();
FileSystem.ClasspathSectionProblemReporter problemReporter =
new FileSystem.ClasspathSectionProblemReporter() {
+ @Override
public void invalidClasspathSection(String jarFilePath) {
addPendingErrors(bind("configure.invalidClasspathSection", jarFilePath)); //$NON-NLS-1$
}
+ @Override
public void multipleClasspathSections(String jarFilePath) {
addPendingErrors(bind("configure.multipleClasspathSections", jarFilePath)); //$NON-NLS-1$
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionElementNotifier.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionElementNotifier.java
index 99427f5..663d487 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionElementNotifier.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionElementNotifier.java
@@ -71,6 +71,7 @@
return new char[][][] {argumentTypes, argumentNames};
}
+ @Override
protected char[][] getInterfaceNames(TypeDeclaration typeDeclaration) {
char[][] interfaceNames = null;
int superInterfacesLength = 0;
@@ -108,6 +109,7 @@
return interfaceNames;
}
+ @Override
protected char[] getSuperclassName(TypeDeclaration typeDeclaration) {
TypeReference superclass = typeDeclaration.superclass;
@@ -117,6 +119,7 @@
return superclass != null ? CharOperation.concatWith(superclass.getParameterizedTypeName(), '.') : null;
}
+ @Override
protected char[][] getThrownExceptions(AbstractMethodDeclaration methodDeclaration) {
char[][] thrownExceptionTypes = null;
TypeReference[] thrownExceptions = methodDeclaration.thrownExceptions;
@@ -142,6 +145,7 @@
return thrownExceptionTypes;
}
+ @Override
protected char[][] getTypeParameterBounds(TypeParameter typeParameter) {
TypeReference firstBound = typeParameter.type;
TypeReference[] otherBounds = typeParameter.bounds;
@@ -182,6 +186,7 @@
return typeParameterBounds;
}
+ @Override
protected void notifySourceElementRequestor(AbstractMethodDeclaration methodDeclaration, TypeDeclaration declaringType, ImportReference currentPackage) {
if (methodDeclaration instanceof CompletionOnMethodReturnType) return;
if (methodDeclaration instanceof CompletionOnMethodTypeParameter) return;
@@ -189,16 +194,19 @@
super.notifySourceElementRequestor(methodDeclaration, declaringType, currentPackage);
}
+ @Override
public void notifySourceElementRequestor(CompilationUnitDeclaration parsedUnit, int sourceStart, int sourceEnd, boolean reportReference, HashtableOfObjectToInt sourceEndsMap, Map nodesToCategoriesMap) {
super.notifySourceElementRequestor(parsedUnit, sourceStart, sourceEnd, reportReference, sourceEndsMap, nodesToCategoriesMap);
}
+ @Override
protected void notifySourceElementRequestor(FieldDeclaration fieldDeclaration, TypeDeclaration declaringType) {
if (fieldDeclaration instanceof CompletionOnFieldType) return;
if (fieldDeclaration instanceof CompletionOnFieldName) return;
super.notifySourceElementRequestor(fieldDeclaration, declaringType);
}
+ @Override
protected void notifySourceElementRequestor(ImportReference importReference, boolean isPackage) {
if (importReference instanceof CompletionOnKeyword2) return;
if (importReference instanceof CompletionOnImportReference ||
@@ -209,6 +217,7 @@
super.notifySourceElementRequestor(importReference, isPackage);
}
+ @Override
protected void notifySourceElementRequestor(TypeDeclaration typeDeclaration, boolean notifyTypePresence, TypeDeclaration declaringType, ImportReference currentPackage) {
if (typeDeclaration instanceof CompletionOnAnnotationOfType) return;
super.notifySourceElementRequestor(typeDeclaration, notifyTypePresence, declaringType, currentPackage);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
index 9558bea..900a4f6 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionEngine.java
@@ -314,6 +314,7 @@
this.accessibility = accessibility;
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append('{');
@@ -348,6 +349,7 @@
this.accessibility = accessibility;
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append('{');
@@ -416,6 +418,7 @@
return pb;
}
+ @Override
public CategorizedProblem createProblem(
char[] originatingFileName,
int problemId,
@@ -441,6 +444,7 @@
columnNumber), originatingFileName, severity, start);
}
+ @Override
public CategorizedProblem createProblem(
char[] originatingFileName,
int problemId,
@@ -826,20 +830,35 @@
static final char[] THROWS = "throws".toCharArray(); //$NON-NLS-1$
static InvocationSite FakeInvocationSite = new InvocationSite(){
+ @Override
public TypeBinding[] genericTypeArguments() { return null; }
+ @Override
public boolean isSuperAccess(){ return false; }
+ @Override
public boolean isTypeAccess(){ return false; }
+ @Override
public void setActualReceiverType(ReferenceBinding receiverType) {/* empty */}
+ @Override
public void setDepth(int depth){/* empty */}
+ @Override
public void setFieldIndex(int depth){/* empty */}
+ @Override
public int sourceEnd() { return 0; }
+ @Override
public int sourceStart() { return 0; }
+ @Override
public TypeBinding invocationTargetType() { return null; }
+ @Override
public boolean receiverIsImplicitThis() { return false; }
+ @Override
public InferenceContext18 freshInferenceContext(Scope scope) { return null; }
+ @Override
public ExpressionContext getExpressionContext() { return ExpressionContext.VANILLA_CONTEXT; }
+ @Override
public boolean isQualifiedSuper() { return false; }
+ @Override
public boolean checkingPotentialCompatibility() { return false; }
+ @Override
public void acceptPotentiallyCompatibleMethods(MethodBinding[] methods) {/* ignore */}
};
@@ -895,6 +914,7 @@
this.monitor = monitor;
}
+ @Override
public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) {
if (!CharOperation.equals(sourceUnit.getMainTypeName(), TypeConstants.PACKAGE_INFO_NAME)) {
// do not accept package-info.java as a type for completion engine
@@ -906,6 +926,7 @@
}
}
+ @Override
public void acceptConstructor(
int modifiers,
char[] simpleTypeName,
@@ -1327,6 +1348,7 @@
* Module names are in the form "a.b.c".
* The default module is represented by an empty array.
*/
+ @Override
public void acceptModule(char[] moduleName) {
if (this.knownModules.containsKey(moduleName)) return;
if (CharOperation.equals(moduleName, this.moduleDeclaration.moduleName)) return;
@@ -1363,6 +1385,7 @@
* Package names are in the form "a.b.c".
* The default package is represented by an empty array.
*/
+ @Override
public void acceptPackage(char[] packageName) {
if (this.knownPkgs.containsKey(packageName)) return;
@@ -1419,6 +1442,7 @@
* Nested type names are in the qualified form "A.I".
* The default package is represented by an empty array.
*/
+ @Override
public void acceptType(
char[] packageName,
char[] simpleTypeName,
@@ -5824,6 +5848,7 @@
MissingTypesGuesser missingTypesConverter = new MissingTypesGuesser(this);
MissingTypesGuesser.GuessedTypeRequestor substitutionRequestor =
new MissingTypesGuesser.GuessedTypeRequestor() {
+ @Override
public void accept(
TypeBinding guessedType,
Binding[] missingElements,
@@ -8190,6 +8215,7 @@
MissingTypesGuesser missingTypesConverter = new MissingTypesGuesser(this);
MissingTypesGuesser.GuessedTypeRequestor substitutionRequestor =
new MissingTypesGuesser.GuessedTypeRequestor() {
+ @Override
public void accept(
TypeBinding guessedType,
Binding[] missingElements,
@@ -10384,6 +10410,7 @@
MissingTypesGuesser missingTypesConverter = new MissingTypesGuesser(this);
MissingTypesGuesser.GuessedTypeRequestor substitutionRequestor =
new MissingTypesGuesser.GuessedTypeRequestor() {
+ @Override
public void accept(
TypeBinding guessedType,
Binding[] missingElements,
@@ -10771,6 +10798,7 @@
MissingTypesGuesser missingTypesConverter = new MissingTypesGuesser(this);
MissingTypesGuesser.GuessedTypeRequestor substitutionRequestor =
new MissingTypesGuesser.GuessedTypeRequestor() {
+ @Override
public void accept(
TypeBinding guessedType,
Binding[] missingElements,
@@ -10805,6 +10833,7 @@
MissingTypesGuesser missingTypesConverter = new MissingTypesGuesser(this);
MissingTypesGuesser.GuessedTypeRequestor substitutionRequestor =
new MissingTypesGuesser.GuessedTypeRequestor() {
+ @Override
public void accept(
TypeBinding guessedType,
Binding[] missingElements,
@@ -12565,6 +12594,7 @@
UnresolvedReferenceNameFinder.UnresolvedReferenceNameRequestor nameRequestor =
new UnresolvedReferenceNameFinder.UnresolvedReferenceNameRequestor() {
+ @Override
public void acceptName(char[] name) {
CompletionEngine.this.acceptUnresolvedName(name);
proposedNames.add(name);
@@ -12633,6 +12663,7 @@
UnresolvedReferenceNameFinder.UnresolvedReferenceNameRequestor nameRequestor =
new UnresolvedReferenceNameFinder.UnresolvedReferenceNameRequestor() {
+ @Override
public void acceptName(char[] name) {
CompletionEngine.this.acceptUnresolvedName(name);
proposedNames.add(name);
@@ -12822,6 +12853,7 @@
UnresolvedReferenceNameFinder.UnresolvedReferenceNameRequestor nameRequestor =
new UnresolvedReferenceNameFinder.UnresolvedReferenceNameRequestor() {
+ @Override
public void acceptName(char[] name) {
int relevance = computeBaseRelevance();
relevance += computeRelevanceForInterestingProposal();
@@ -12973,20 +13005,24 @@
}
}
+ @Override
public void acceptNameWithoutPrefixAndSuffix(char[] name,int reusedCharacters) {
accept(name, 0, reusedCharacters);
}
+ @Override
public void acceptNameWithPrefix(char[] name, boolean isFirstPrefix, int reusedCharacters) {
accept(name, isFirstPrefix ? R_NAME_FIRST_PREFIX : R_NAME_PREFIX, reusedCharacters);
}
+ @Override
public void acceptNameWithPrefixAndSuffix(char[] name, boolean isFirstPrefix, boolean isFirstSuffix, int reusedCharacters) {
accept(
name,
(isFirstPrefix ? R_NAME_FIRST_PREFIX : R_NAME_PREFIX) + (isFirstSuffix ? R_NAME_FIRST_SUFFIX : R_NAME_SUFFIX),
reusedCharacters);
}
+ @Override
public void acceptNameWithSuffix(char[] name, boolean isFirstSuffix, int reusedCharacters) {
accept(name, isFirstSuffix ? R_NAME_FIRST_SUFFIX : R_NAME_SUFFIX, reusedCharacters);
}
@@ -13487,6 +13523,7 @@
return this.noCacheNameEnvironment;
}
+ @Override
public AssistParser getParser() {
return this.parser;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionRequestorWrapper.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionRequestorWrapper.java
index 62af4a3..91bfab2 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionRequestorWrapper.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionRequestorWrapper.java
@@ -30,6 +30,7 @@
this.requestor = requestor;
}
+ @Override
public void accept(CompletionProposal proposal) {
InternalCompletionProposal internalCompletionProposal = (InternalCompletionProposal) proposal;
switch(internalCompletionProposal.getKind()) {
@@ -312,6 +313,7 @@
}
}
+ @Override
public void completionFailure(IProblem problem) {
this.requestor.acceptError(problem);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionUnitStructureRequestor.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionUnitStructureRequestor.java
index 93287da..1ea6ddd 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionUnitStructureRequestor.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/CompletionUnitStructureRequestor.java
@@ -79,10 +79,12 @@
this.elementWithProblemCache = elementWithProblemCache;
}
+ @Override
protected Annotation createAnnotation(JavaElement parent, String name) {
return new AssistAnnotation(parent, name, this.newElements);
}
+ @Override
protected SourceField createField(JavaElement parent, FieldInfo fieldInfo) {
String fieldName = JavaModelManager.getJavaModelManager().intern(new String(fieldInfo.name));
AssistSourceField field = new AssistSourceField(parent, fieldName, this.bindingCache, this.newElements);
@@ -95,18 +97,22 @@
return field;
}
+ @Override
protected ImportContainer createImportContainer(ICompilationUnit parent) {
return new AssistImportContainer((CompilationUnit)parent, this.newElements);
}
+ @Override
protected ImportDeclaration createImportDeclaration(ImportContainer parent, String name, boolean onDemand) {
return new AssistImportDeclaration(parent, name, onDemand, this.newElements);
}
+ @Override
protected Initializer createInitializer(JavaElement parent) {
return new AssistInitializer(parent, 1, this.bindingCache, this.newElements);
}
+ @Override
protected SourceMethod createMethodHandle(JavaElement parent, MethodInfo methodInfo) {
String selector = JavaModelManager.getJavaModelManager().intern(new String(methodInfo.name));
String[] parameterTypeSigs = convertTypeNamesToSigs(methodInfo.parameterTypes);
@@ -120,10 +126,12 @@
return method;
}
+ @Override
protected PackageDeclaration createPackageDeclaration(JavaElement parent, String name) {
return new AssistPackageDeclaration((CompilationUnit) parent, name, this.newElements);
}
+ @Override
protected SourceType createTypeHandle(JavaElement parent, TypeInfo typeInfo) {
String nameString= new String(typeInfo.name);
AssistSourceType type = new AssistSourceType(parent, nameString, this.bindingCache, this.newElements);
@@ -136,10 +144,12 @@
return type;
}
+ @Override
protected TypeParameter createTypeParameter(JavaElement parent, String name) {
return new AssistTypeParameter(parent, name, this.newElements);
}
+ @Override
protected IAnnotation acceptAnnotation(
org.eclipse.jdt.internal.compiler.ast.Annotation annotation,
AnnotatableInfo parentInfo,
@@ -153,6 +163,7 @@
return super.acceptAnnotation(annotation, parentInfo, parentHandle);
}
+ @Override
protected Object getMemberValue(
org.eclipse.jdt.internal.core.MemberValuePair memberValuePair,
Expression expression) {
@@ -165,6 +176,7 @@
}
return super.getMemberValue(memberValuePair, expression);
}
+ @Override
protected IMemberValuePair[] getMemberValuePairs(MemberValuePair[] memberValuePairs) {
int membersLength = memberValuePairs.length;
int membersCount = 0;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionContext.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionContext.java
index bba8d78..48b34e4 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionContext.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionContext.java
@@ -144,6 +144,7 @@
*
* @since 3.4
*/
+ @Override
public IJavaElement getEnclosingElement() {
if (!this.isExtended) throw new UnsupportedOperationException("Operation only supported in extended context"); //$NON-NLS-1$
@@ -162,6 +163,7 @@
*
* @see org.eclipse.jdt.core.dom.ASTParser#createASTs(ICompilationUnit[], String[], org.eclipse.jdt.core.dom.ASTRequestor, org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public char[][] getExpectedTypesKeys() {
return this.expectedTypesKeys;
}
@@ -176,6 +178,7 @@
*
* @see Signature
*/
+ @Override
public char[][] getExpectedTypesSignatures() {
return this.expectedTypesSignatures;
}
@@ -187,6 +190,7 @@
* @return offset position in the source file buffer
* @since 3.2
*/
+ @Override
public int getOffset() {
return this.offset;
}
@@ -202,6 +206,7 @@
* @return completed token or <code>null</code>
* @since 3.2
*/
+ @Override
public char[] getToken() {
return this.token;
}
@@ -217,6 +222,7 @@
* @since 3.2
*/
// TODO (david) https://bugs.eclipse.org/bugs/show_bug.cgi?id=132558
+ @Override
public int getTokenEnd() {
return this.tokenEnd;
}
@@ -236,6 +242,7 @@
* or possibly a kind unknown to the caller
* @since 3.2
*/
+ @Override
public int getTokenKind() {
return this.tokenKind;
}
@@ -257,6 +264,7 @@
*
* @since 3.4
*/
+ @Override
public int getTokenLocation() {
return this.tokenLocation;
}
@@ -275,6 +283,7 @@
* @return character index of token start position (inclusive)
* @since 3.2
*/
+ @Override
public int getTokenStart() {
return this.tokenStart;
}
@@ -316,6 +325,7 @@
*
* @since 3.4
*/
+ @Override
public IJavaElement[] getVisibleElements(String typeSignature) {
if (!this.isExtended) throw new UnsupportedOperationException("Operation only supported in extended context"); //$NON-NLS-1$
@@ -332,6 +342,7 @@
*
* @since 3.4
*/
+ @Override
public boolean isExtended() {
return this.isExtended;
}
@@ -342,6 +353,7 @@
* @return boolean true if completion takes place in a javadoc comment, false otherwise.
* @since 3.2
*/
+ @Override
public boolean isInJavadoc() {
return this.javadoc != 0;
}
@@ -361,6 +373,7 @@
* @return boolean true if completion takes place in formal reference of a javadoc tag, false otherwise.
* @since 3.2
*/
+ @Override
public boolean isInJavadocFormalReference() {
return (this.javadoc & CompletionOnJavadoc.FORMAL_REFERENCE) != 0;
}
@@ -371,6 +384,7 @@
* @return boolean true if completion takes place in a text area of a javadoc comment, false otherwise.
* @since 3.2
*/
+ @Override
public boolean isInJavadocText() {
return (this.javadoc & CompletionOnJavadoc.TEXT) != 0;
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java
index 23e59c6..8a2be7a 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalCompletionProposal.java
@@ -501,6 +501,7 @@
*
* @since 3.3
*/
+ @Override
public int getAdditionalFlags() {
return this.additionalFlags;
}
@@ -520,6 +521,7 @@
*
* @since 3.3
*/
+ @Override
public void setAdditionalFlags(int additionalFlags) {
this.additionalFlags = additionalFlags;
}
@@ -538,6 +540,7 @@
* declared on this class, or possibly a kind unknown
* to the caller
*/
+ @Override
public int getKind() {
return this.completionKind;
}
@@ -552,6 +555,7 @@
* @see ICodeAssist#codeComplete(int,CompletionRequestor)
*/
// TODO (david) https://bugs.eclipse.org/bugs/show_bug.cgi?id=132558
+ @Override
public int getCompletionLocation() {
return this.completionLocation;
}
@@ -569,6 +573,7 @@
*
* @return character index of token start position (inclusive)
*/
+ @Override
public int getTokenStart() {
return this.tokenStart;
}
@@ -582,6 +587,7 @@
*
* @return character index of token end position (exclusive)
*/
+ @Override
public int getTokenEnd() {
return this.tokenEnd;
}
@@ -602,6 +608,7 @@
* @param startIndex character index of token start position (inclusive)
* @param endIndex character index of token end position (exclusive)
*/
+ @Override
public void setTokenRange(int startIndex, int endIndex) {
if (startIndex < 0 || endIndex < startIndex) {
throw new IllegalArgumentException();
@@ -621,6 +628,7 @@
*
* @return the completion string
*/
+ @Override
public char[] getCompletion() {
//{ObjectTeams: callouts:
/* orig:
@@ -686,6 +694,7 @@
*
* @param completion the completion string
*/
+ @Override
public void setCompletion(char[] completion) {
this.completion = completion;
}
@@ -711,6 +720,7 @@
*
* @return replacement start position (inclusive)
*/
+ @Override
public int getReplaceStart() {
return this.replaceStart;
}
@@ -725,6 +735,7 @@
*
* @return replacement end position (exclusive)
*/
+ @Override
public int getReplaceEnd() {
return this.replaceEnd;
}
@@ -747,6 +758,7 @@
* @param startIndex character index of replacement start position (inclusive)
* @param endIndex character index of replacement end position (exclusive)
*/
+ @Override
public void setReplaceRange(int startIndex, int endIndex) {
if (startIndex < 0 || endIndex < startIndex) {
throw new IllegalArgumentException();
@@ -760,6 +772,7 @@
*
* @return relevance rating of this proposal; ratings are positive; higher means better
*/
+ @Override
public int getRelevance() {
return this.relevance;
}
@@ -776,6 +789,7 @@
*
* @param rating relevance rating of this proposal; ratings are positive; higher means better
*/
+ @Override
public void setRelevance(int rating) {
if (rating <= 0) {
throw new IllegalArgumentException();
@@ -827,6 +841,7 @@
* on the kind of completion), or <code>null</code> if none
* @see Signature
*/
+ @Override
public char[] getDeclarationSignature() {
return this.declarationSignature;
}
@@ -853,6 +868,7 @@
* @see org.eclipse.jdt.core.dom.ASTParser#createASTs(ICompilationUnit[], String[], org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)
* @since 3.1
*/
+ @Override
public char[] getDeclarationKey() {
return this.declarationKey;
}
@@ -871,6 +887,7 @@
* @param signature the type or package or module(1.9) signature, or
* <code>null</code> if none
*/
+ @Override
public void setDeclarationSignature(char[] signature) {
this.declarationSignature = signature;
}
@@ -890,6 +907,7 @@
* <code>null</code> if none
* @since 3.1
*/
+ @Override
public void setDeclarationKey(char[] key) {
this.declarationKey = key;
}
@@ -924,6 +942,7 @@
* @return the keyword, field, method, local variable, or member
* name, or <code>null</code> if none
*/
+ @Override
public char[] getName() {
return this.name;
}
@@ -944,6 +963,7 @@
* @param name the keyword, field, method, local variable,
* or member name, or <code>null</code> if none
*/
+ @Override
public void setName(char[] name) {
this.name = name;
}
@@ -1031,6 +1051,7 @@
* @return the signature, or <code>null</code> if none
* @see Signature
*/
+ @Override
public char[] getSignature() {
return this.signature;
}
@@ -1057,6 +1078,7 @@
* @see org.eclipse.jdt.core.dom.ASTParser#createASTs(ICompilationUnit[], String[], org.eclipse.jdt.core.dom.ASTRequestor, IProgressMonitor)
* @since 3.1
*/
+ @Override
public char[] getKey() {
return this.key;
}
@@ -1279,6 +1301,7 @@
*
* @param signature the signature, or <code>null</code> if none
*/
+ @Override
public void setSignature(char[] signature) {
this.signature = signature;
}
@@ -1297,6 +1320,7 @@
* @param key the key, or <code>null</code> if none
* @since 3.1
*/
+ @Override
public void setKey(char[] key) {
this.key = key;
}
@@ -1363,6 +1387,7 @@
* <code>Flags.AccDefault</code> if none
* @see Flags
*/
+ @Override
public int getFlags() {
return this.flags;
}
@@ -1380,6 +1405,7 @@
* @param flags the modifier flags, or
* <code>Flags.AccDefault</code> if none
*/
+ @Override
public void setFlags(int flags) {
this.flags = flags;
}
@@ -1438,6 +1464,7 @@
*
* @since 3.3
*/
+ @Override
public CompletionProposal[] getRequiredProposals() {
return this.requiredProposals;
}
@@ -1457,6 +1484,7 @@
* <code>null</code> if none
* @since 3.3
*/
+ @Override
public void setRequiredProposals(CompletionProposal[] proposals) {
this.requiredProposals = proposals;
}
@@ -1478,6 +1506,7 @@
* @return the parameter names, or <code>null</code> if none
* or not available or not relevant
*/
+ @Override
public char[][] findParameterNames(IProgressMonitor monitor) {
if (!this.parameterNamesComputed) {
this.parameterNamesComputed = true;
@@ -1588,6 +1617,7 @@
*
* @param parameterNames the parameter names, or <code>null</code> if none
*/
+ @Override
public void setParameterNames(char[][] parameterNames) {
this.parameterNames = parameterNames;
this.parameterNamesComputed = true;
@@ -1613,6 +1643,7 @@
*
* @since 3.1
*/
+ @Override
public int getAccessibility() {
return this.accessibility;
}
@@ -1635,6 +1666,7 @@
* @return <code>true</code> if the proposal is a constructor.
* @since 3.1
*/
+ @Override
public boolean isConstructor() {
return this.isConstructor;
}
@@ -1666,6 +1698,7 @@
*
* @since 3.4
*/
+ @Override
public char[] getReceiverSignature() {
return this.receiverSignature;
}
@@ -1690,6 +1723,7 @@
*
* @since 3.4
*/
+ @Override
public int getReceiverStart() {
return this.receiverStart;
}
@@ -1713,6 +1747,7 @@
*
* @since 3.4
*/
+ @Override
public int getReceiverEnd() {
return this.receiverEnd;
}
@@ -1733,6 +1768,7 @@
*
* @since 3.4
*/
+ @Override
public void setReceiverSignature(char[] signature) {
this.receiverSignature = signature;
}
@@ -1751,11 +1787,13 @@
*
* @since 3.4
*/
+ @Override
public void setReceiverRange(int startIndex, int endIndex) {
this.receiverStart = startIndex;
this.receiverEnd = endIndex;
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append('[');
@@ -1878,6 +1916,7 @@
return buffer.toString();
}
+ @Override
public boolean canUseDiamond(CompletionContext coreContext) {
if (this.getKind() != CONSTRUCTOR_INVOCATION) return false;
if (coreContext instanceof InternalCompletionContext) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
index 671f494..7a25476 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/InternalExtendedCompletionContext.java
@@ -73,6 +73,7 @@
@SuppressWarnings({"rawtypes", "unchecked"})
public class InternalExtendedCompletionContext {
private static Util.BindingsToNodesMap EmptyNodeMap = new Util.BindingsToNodesMap() {
+ @Override
public ASTNode get(Binding binding) {
return null;
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java
index 16dcd1e..5f8d051 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/MissingTypesGuesser.java
@@ -78,71 +78,85 @@
this.firstCall = false;
}
+ @Override
public boolean visit(SingleTypeReference singleTypeReference, BlockScope scope) {
this.cleanUp(singleTypeReference);
return true;
}
+ @Override
public boolean visit(SingleTypeReference singleTypeReference, ClassScope scope) {
this.cleanUp(singleTypeReference);
return true;
}
+ @Override
public boolean visit(Wildcard wildcard, BlockScope scope) {
this.cleanUp(wildcard);
return true;
}
+ @Override
public boolean visit(Wildcard wildcard, ClassScope scope) {
this.cleanUp(wildcard);
return true;
}
+ @Override
public boolean visit(ArrayTypeReference arrayTypeReference, BlockScope scope) {
this.cleanUp(arrayTypeReference);
return true;
}
+ @Override
public boolean visit(ArrayTypeReference arrayTypeReference, ClassScope scope) {
this.cleanUp(arrayTypeReference);
return true;
}
+ @Override
public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope) {
this.cleanUp(parameterizedSingleTypeReference);
return true;
}
+ @Override
public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) {
this.cleanUp(parameterizedSingleTypeReference);
return true;
}
+ @Override
public boolean visit(QualifiedTypeReference qualifiedTypeReference, BlockScope scope) {
this.cleanUp(qualifiedTypeReference);
return true;
}
+ @Override
public boolean visit(QualifiedTypeReference qualifiedTypeReference, ClassScope scope) {
this.cleanUp(qualifiedTypeReference);
return true;
}
+ @Override
public boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, BlockScope scope) {
this.cleanUp(arrayQualifiedTypeReference);
return true;
}
+ @Override
public boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, ClassScope scope) {
this.cleanUp(arrayQualifiedTypeReference);
return true;
}
+ @Override
public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) {
this.cleanUp(parameterizedQualifiedTypeReference);
return true;
}
+ @Override
public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope) {
this.cleanUp(parameterizedQualifiedTypeReference);
return true;
@@ -463,6 +477,7 @@
isQualified ? CharOperation.concatWith(missingTypeName, '.') : null;
final ArrayList results = new ArrayList();
ISearchRequestor storage = new ISearchRequestor() {
+ @Override
public void acceptConstructor(
int modifiers,
char[] simpleTypeName,
@@ -481,9 +496,11 @@
public void acceptModule(char[] moduleName) {
// TODO Auto-generated method stub
}
+ @Override
public void acceptPackage(char[] packageName) {
// package aren't searched
}
+ @Override
public void acceptType(
char[] packageName,
char[] typeName,
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
index 009c360..f9fe6a1 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/SelectionEngine.java
@@ -175,6 +175,7 @@
this.importReferences = importReferences;
}
+ @Override
public void acceptType(int modifiers, char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, String path, AccessRestriction access) {
if (enclosingTypeNames != null && enclosingTypeNames.length > 0) return;
@@ -328,6 +329,7 @@
this.compilerOptions,
new DefaultProblemFactory(Locale.getDefault())) {
+ @Override
public CategorizedProblem createProblem(
char[] fileName,
int problemId,
@@ -361,6 +363,7 @@
this.owner = owner;
}
+ @Override
public void acceptConstructor(
int modifiers,
char[] simpleTypeName,
@@ -376,6 +379,7 @@
// constructors aren't searched
}
+ @Override
public void acceptType(char[] packageName, char[] simpleTypeName, char[][] enclosingTypeNames, int modifiers, AccessRestriction accessRestriction) {
char[] typeName = enclosingTypeNames == null ?
simpleTypeName :
@@ -494,6 +498,7 @@
* Package names are in the form "a.b.c".
* The default package is represented by an empty array.
*/
+ @Override
public void acceptPackage(char[] packageName) {
// implementation of interface method
}
@@ -871,33 +876,42 @@
try {
IProgressMonitor progressMonitor = new IProgressMonitor() {
boolean isCanceled = false;
+ @Override
public void beginTask(String name, int totalWork) {
// implements interface method
}
+ @Override
public void done() {
// implements interface method
}
+ @Override
public void internalWorked(double work) {
// implements interface method
}
+ @Override
public boolean isCanceled() {
return this.isCanceled;
}
+ @Override
public void setCanceled(boolean value) {
this.isCanceled = value;
}
+ @Override
public void setTaskName(String name) {
// implements interface method
}
+ @Override
public void subTask(String name) {
// implements interface method
}
+ @Override
public void worked(int work) {
// implements interface method
}
};
TypeNameMatchRequestor typeNameMatchRequestor = new TypeNameMatchRequestor() {
+ @Override
public void acceptTypeNameMatch(TypeNameMatch match) {
if (SelectionEngine.this.requestor instanceof SelectionRequestor) {
SelectionEngine.this.noProposal = false;
@@ -936,6 +950,7 @@
}
}
+ @Override
public AssistParser getParser() {
return this.parser;
}
@@ -1606,6 +1621,7 @@
if (assistIdentifier == null) return;
class Visitor extends ASTVisitor {
+ @Override
public boolean visit(ConstructorDeclaration constructorDeclaration, ClassScope scope) {
if (constructorDeclaration.selector == assistIdentifier){
if (constructorDeclaration.binding != null) {
@@ -1618,24 +1634,28 @@
}
return true;
}
+ @Override
public boolean visit(FieldDeclaration fieldDeclaration, MethodScope scope) {
if (fieldDeclaration.name == assistIdentifier){
throw new SelectionNodeFound(fieldDeclaration.binding);
}
return true;
}
+ @Override
public boolean visit(TypeDeclaration localTypeDeclaration, BlockScope scope) {
if (localTypeDeclaration.name == assistIdentifier) {
throw new SelectionNodeFound(localTypeDeclaration.binding);
}
return true;
}
+ @Override
public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope) {
if (memberTypeDeclaration.name == assistIdentifier) {
throw new SelectionNodeFound(memberTypeDeclaration.binding);
}
return true;
}
+ @Override
public boolean visit(MethodDeclaration methodDeclaration, ClassScope scope) {
if (methodDeclaration.selector == assistIdentifier){
if (methodDeclaration.binding != null) {
@@ -1648,18 +1668,21 @@
}
return true;
}
+ @Override
public boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope) {
if (typeDeclaration.name == assistIdentifier) {
throw new SelectionNodeFound(typeDeclaration.binding);
}
return true;
}
+ @Override
public boolean visit(TypeParameter typeParameter, BlockScope scope) {
if (typeParameter.name == assistIdentifier) {
throw new SelectionNodeFound(typeParameter.binding);
}
return true;
}
+ @Override
public boolean visit(TypeParameter typeParameter, ClassScope scope) {
if (typeParameter.name == assistIdentifier) {
throw new SelectionNodeFound(typeParameter.binding);
@@ -2085,6 +2108,7 @@
ReferenceBinding type= method.declaringClass;
final SelectionRequestor requestor1 = (SelectionRequestor) this.requestor;
return new InheritDocVisitor() {
+ @Override
public Object visit(ReferenceBinding currType) throws JavaModelException {
MethodBinding overridden = findOverriddenMethodInType(currType, method);
if (overridden == null)
@@ -2137,9 +2161,11 @@
*/
static abstract class InheritDocVisitor {
public static final Object STOP_BRANCH= new Object() {
+ @Override
public String toString() { return "STOP_BRANCH"; } //$NON-NLS-1$
};
public static final Object CONTINUE= new Object() {
+ @Override
public String toString() { return "CONTINUE"; } //$NON-NLS-1$
};
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java
index be5d34d..c0f16f5 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/ThrownExceptionFinder.java
@@ -60,6 +60,7 @@
}
}
+ @Override
public void endVisit(MessageSend messageSend, BlockScope scope) {
if (messageSend.binding != null) {
endVisitMethodInvocation(messageSend.binding);
@@ -67,6 +68,7 @@
super.endVisit(messageSend, scope);
}
+ @Override
public void endVisit(AllocationExpression allocationExpression, BlockScope scope) {
if (allocationExpression.binding != null) {
endVisitMethodInvocation(allocationExpression.binding);
@@ -74,6 +76,7 @@
super.endVisit(allocationExpression, scope);
}
+ @Override
public void endVisit(ThrowStatement throwStatement, BlockScope scope) {
acceptException((ReferenceBinding)throwStatement.exception.resolvedType);
super.endVisit(throwStatement, scope);
@@ -124,14 +127,17 @@
this.discouragedExceptions.asArray(allDiscouragedExceptions);
return allDiscouragedExceptions;
}
+ @Override
public boolean visit(TypeDeclaration typeDeclaration, CompilationUnitScope scope) {
return visitType(typeDeclaration);
}
+ @Override
public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope scope) {
return visitType(memberTypeDeclaration);
}
+ @Override
public boolean visit(TypeDeclaration localTypeDeclaration, BlockScope scope) {
return visitType(localTypeDeclaration);
}
@@ -140,6 +146,7 @@
return false;
}
+ @Override
public boolean visit(TryStatement tryStatement, BlockScope scope) {
this.exceptionsStack.push(this.thrownExceptions);
SimpleSet exceptionSet = new SimpleSet();
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java
index c96ef3e..c008d21 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/UnresolvedReferenceNameFinder.java
@@ -288,6 +288,7 @@
return null;
}
+ @Override
public boolean visit(Block block, BlockScope blockScope) {
ASTNode enclosingDeclaration = getEnclosingDeclaration();
removeLocals(block.statements, enclosingDeclaration.sourceStart, block.sourceEnd);
@@ -295,6 +296,7 @@
return true;
}
+ @Override
public boolean visit(ConstructorDeclaration constructorDeclaration, ClassScope classScope) {
if (((constructorDeclaration.bits & ASTNode.IsDefaultConstructor) == 0) && !constructorDeclaration.isClinit()) {
removeLocals(
@@ -310,16 +312,19 @@
return true;
}
+ @Override
public boolean visit(FieldDeclaration fieldDeclaration, MethodScope methodScope) {
pushParent(fieldDeclaration);
return true;
}
+ @Override
public boolean visit(Initializer initializer, MethodScope methodScope) {
pushParent(initializer);
return true;
}
+ @Override
public boolean visit(MethodDeclaration methodDeclaration, ClassScope classScope) {
removeLocals(
methodDeclaration.arguments,
@@ -333,30 +338,36 @@
return true;
}
+ @Override
public boolean visit(TypeDeclaration localTypeDeclaration, BlockScope blockScope) {
removeFields(localTypeDeclaration);
pushParent(localTypeDeclaration);
return true;
}
+ @Override
public boolean visit(TypeDeclaration memberTypeDeclaration, ClassScope classScope) {
removeFields(memberTypeDeclaration);
pushParent(memberTypeDeclaration);
return true;
}
+ @Override
public void endVisit(Block block, BlockScope blockScope) {
popParent();
}
+ @Override
public void endVisit(Argument argument, BlockScope blockScope) {
endVisitRemoved(argument.declarationSourceStart, argument.sourceEnd);
}
+ @Override
public void endVisit(Argument argument, ClassScope classScope) {
endVisitRemoved(argument.declarationSourceStart, argument.sourceEnd);
}
+ @Override
public void endVisit(ConstructorDeclaration constructorDeclaration, ClassScope classScope) {
if (((constructorDeclaration.bits & ASTNode.IsDefaultConstructor) == 0) && !constructorDeclaration.isClinit()) {
endVisitPreserved(constructorDeclaration.bodyStart, constructorDeclaration.bodyEnd);
@@ -364,21 +375,25 @@
popParent();
}
+ @Override
public void endVisit(FieldDeclaration fieldDeclaration, MethodScope methodScope) {
endVisitRemoved(fieldDeclaration.declarationSourceStart, fieldDeclaration.sourceEnd);
endVisitPreserved(fieldDeclaration.sourceEnd, fieldDeclaration.declarationEnd);
popParent();
}
+ @Override
public void endVisit(Initializer initializer, MethodScope methodScope) {
endVisitPreserved(initializer.bodyStart, initializer.bodyEnd);
popParent();
}
+ @Override
public void endVisit(LocalDeclaration localDeclaration, BlockScope blockScope) {
endVisitRemoved(localDeclaration.declarationSourceStart, localDeclaration.sourceEnd);
}
+ @Override
public void endVisit(MethodDeclaration methodDeclaration, ClassScope classScope) {
endVisitPreserved(
methodDeclaration.bodyStart,
@@ -386,11 +401,13 @@
popParent();
}
+ @Override
public void endVisit(TypeDeclaration typeDeclaration, BlockScope blockScope) {
endVisitRemoved(typeDeclaration.sourceStart, typeDeclaration.declarationSourceEnd);
popParent();
}
+ @Override
public void endVisit(TypeDeclaration typeDeclaration, ClassScope classScope) {
endVisitRemoved(typeDeclaration.sourceStart, typeDeclaration.declarationSourceEnd);
popParent();
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/AssistNodeParentAnnotationArrayInitializer.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/AssistNodeParentAnnotationArrayInitializer.java
index f24f781..18b1d35 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/AssistNodeParentAnnotationArrayInitializer.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/AssistNodeParentAnnotationArrayInitializer.java
@@ -21,6 +21,7 @@
this.name = name;
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
output.append("<AssistNodeParentAnnotationArrayInitializer:"); //$NON-NLS-1$
output.append('@');
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java
index c5f7b0b..dc53fc7 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadoc.java
@@ -94,6 +94,7 @@
/*
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output).append("/**\n"); //$NON-NLS-1$
boolean nodePrinted = false;
@@ -162,6 +163,7 @@
*
* @throws CompletionNodeFound
*/
+ @Override
public void resolve(ClassScope scope) {
super.resolve(scope);
internalResolve(scope);
@@ -173,6 +175,7 @@
*
* @throws CompletionNodeFound
*/
+ @Override
public void resolve(CompilationUnitScope scope) {
internalResolve(scope);
}
@@ -183,6 +186,7 @@
*
* @throws CompletionNodeFound
*/
+ @Override
public void resolve(MethodScope scope) {
super.resolve(scope);
internalResolve(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java
index 204509a..2c5fbb6 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionJavadocParser.java
@@ -65,6 +65,7 @@
/*
* Do not parse comment if completion location is not included.
*/
+ @Override
public boolean checkDeprecation(int commentPtr) {
boolean isDeprecated = false;
@@ -94,6 +95,7 @@
/*
* Replace stored Javadoc node with specific completion one.
*/
+ @Override
protected boolean commentParse() {
this.docComment = new CompletionJavadoc(this.javadocStart, this.javadocEnd);
this.firstTagPosition = 1; // bug 429340: completion parser needs to parse the whole comment
@@ -103,6 +105,7 @@
/*
* Create argument expression. If it includes completion location, create and store completion node.
*/
+ @Override
protected Object createArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPositions, long argNamePos) throws InvalidInputException {
// Create argument as we may need it after
char[] argName = name==null ? CharOperation.NO_CHAR : name;
@@ -131,6 +134,7 @@
/*
* Create field reference. If it includes completion location, create and store completion node.
*/
+ @Override
protected Object createFieldReference(Object receiver) throws InvalidInputException {
int refStart = (int) (this.identifierPositionStack[0] >>> 32);
int refEnd = (int) this.identifierPositionStack[0];
@@ -158,6 +162,7 @@
* If so, create method reference and store it.
* Otherwise return null as we do not need this reference.
*/
+ @Override
protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {
int memberPtr = this.identifierLengthStack[0] - 1; // may be > 0 for inner class constructor reference
int refStart = (int) (this.identifierPositionStack[memberPtr] >>> 32);
@@ -190,6 +195,7 @@
/*
* Create type reference. If it includes completion location, create and store completion node.
*/
+ @Override
protected Object createTypeReference(int primitiveToken) {
// Need to create type ref in case it was needed by members
int nbIdentifiers = this.identifierLengthStack[this.identifierLengthPtr];
@@ -313,6 +319,7 @@
/*
* Parse argument in @see tag method reference
*/
+ @Override
protected Object parseArguments(Object receiver) throws InvalidInputException {
if (this.tagSourceStart>this.cursorLocation) {
@@ -459,6 +466,7 @@
throw new InvalidInputException();
}
+ @Override
protected boolean parseParam() throws InvalidInputException {
int startPosition = this.index;
int endPosition = this.index;
@@ -539,6 +547,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseReference()
*/
+ @Override
protected boolean parseReference() throws InvalidInputException {
boolean completed = this.completionNode != null;
boolean valid = super.parseReference();
@@ -551,6 +560,7 @@
/*(non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseTag(int)
*/
+ @Override
protected boolean parseTag(int previousPosition) throws InvalidInputException {
int startPosition = this.inlineTagStarted ? this.inlineTagStart : previousPosition;
boolean newLine = !this.lineStarted;
@@ -577,6 +587,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#parseThrows()
*/
+ @Override
protected boolean parseThrows() {
try {
Object typeRef = parseQualifiedName(true);
@@ -602,6 +613,7 @@
/*
* Push param name reference. If it includes completion location, create and store completion node.
*/
+ @Override
protected boolean pushParamName(boolean isTypeParam) {
if (super.pushParamName(isTypeParam)) {
Expression expression = (Expression) this.astStack[this.astPtr];
@@ -627,6 +639,7 @@
*
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#pushText(int, int)
*/
+ @Override
protected void pushText(int start, int end) {
if (start <= this.cursorLocation && this.cursorLocation <= end) {
this.scanner.resetTo(start, end);
@@ -795,6 +808,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#readToken()
*/
+ @Override
protected int readToken() throws InvalidInputException {
int token = super.readToken();
if (token == TerminalTokens.TokenNameIdentifier && this.scanner.currentPosition == this.scanner.startPosition) {
@@ -807,6 +821,7 @@
/*
* Recover syntax on invalid qualified name.
*/
+ @Override
protected Object syntaxRecoverQualifiedName(int primitiveToken) throws InvalidInputException {
if (this.cursorLocation == ((int)this.identifierPositionStack[this.identifierPtr])) {
// special case of completion just before the dot.
@@ -908,6 +923,7 @@
/*
* Store completion node into doc comment.
*/
+ @Override
protected void updateDocComment() {
super.updateDocComment();
if (this.completionNode instanceof Expression) {
@@ -920,6 +936,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.AbstractCommentParser#verifySpaceOrEndComment()
*/
+ @Override
protected boolean verifySpaceOrEndComment() {
CompletionScanner completionScanner = (CompletionScanner) this.scanner;
if (completionScanner.completionIdentifier != null && completionScanner.completedIdentifierStart <= this.cursorLocation && this.cursorLocation <= completionScanner.completedIdentifierEnd) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionNodeDetector.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionNodeDetector.java
index 8418693..4e9ce09 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionNodeDetector.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionNodeDetector.java
@@ -38,99 +38,131 @@
public ASTNode getCompletionNodeParent() {
return this.parent;
}
+ @Override
public void endVisit(AllocationExpression allocationExpression, BlockScope scope) {
endVisit(allocationExpression);
}
+ @Override
public void endVisit(AND_AND_Expression and_and_Expression, BlockScope scope) {
endVisit(and_and_Expression);
}
+ @Override
public void endVisit(ArrayAllocationExpression arrayAllocationExpression, BlockScope scope) {
endVisit(arrayAllocationExpression);
}
+ @Override
public void endVisit(ArrayInitializer arrayInitializer, BlockScope scope) {
endVisit(arrayInitializer);
}
+ @Override
public void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, BlockScope scope) {
endVisit(arrayQualifiedTypeReference);
}
+ @Override
public void endVisit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, ClassScope scope) {
endVisit(arrayQualifiedTypeReference);
}
+ @Override
public void endVisit(ArrayReference arrayReference, BlockScope scope) {
endVisit(arrayReference);
}
+ @Override
public void endVisit(ArrayTypeReference arrayTypeReference, BlockScope scope) {
endVisit(arrayTypeReference);
}
+ @Override
public void endVisit(ArrayTypeReference arrayTypeReference, ClassScope scope) {
endVisit(arrayTypeReference);
}
+ @Override
public void endVisit(Assignment assignment, BlockScope scope) {
endVisit(assignment);
}
+ @Override
public void endVisit(BinaryExpression binaryExpression, BlockScope scope) {
endVisit(binaryExpression);
}
+ @Override
public void endVisit(CastExpression castExpression, BlockScope scope) {
endVisit(castExpression);
}
+ @Override
public void endVisit(CompoundAssignment compoundAssignment, BlockScope scope) {
endVisit(compoundAssignment);
}
+ @Override
public void endVisit(ConditionalExpression conditionalExpression, BlockScope scope) {
endVisit(conditionalExpression);
}
+ @Override
public void endVisit(EqualExpression equalExpression, BlockScope scope) {
endVisit(equalExpression);
}
+ @Override
public void endVisit(ExplicitConstructorCall explicitConstructor, BlockScope scope) {
endVisit(explicitConstructor);
}
+ @Override
public void endVisit(FieldReference fieldReference, BlockScope scope) {
endVisit(fieldReference);
}
+ @Override
public void endVisit(InstanceOfExpression instanceOfExpression, BlockScope scope) {
endVisit(instanceOfExpression);
}
+ @Override
public void endVisit(MessageSend messageSend, BlockScope scope) {
endVisit(messageSend);
}
+ @Override
public void endVisit(OR_OR_Expression or_or_Expression, BlockScope scope) {
endVisit(or_or_Expression);
}
+ @Override
public void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) {
endVisit(parameterizedQualifiedTypeReference);
}
+ @Override
public void endVisit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope) {
endVisit(parameterizedQualifiedTypeReference);
}
+ @Override
public void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope) {
endVisit(parameterizedSingleTypeReference);
}
+ @Override
public void endVisit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) {
endVisit(parameterizedSingleTypeReference);
}
+ @Override
public void endVisit(PostfixExpression postfixExpression, BlockScope scope) {
endVisit(postfixExpression);
}
+ @Override
public void endVisit(PrefixExpression prefixExpression, BlockScope scope) {
endVisit(prefixExpression);
}
+ @Override
public void endVisit(QualifiedAllocationExpression qualifiedAllocationExpression, BlockScope scope) {
endVisit(qualifiedAllocationExpression);
}
+ @Override
public void endVisit(QualifiedNameReference qualifiedNameReference, BlockScope scope) {
endVisit(qualifiedNameReference);
}
+ @Override
public void endVisit(QualifiedSuperReference qualifiedSuperReference, BlockScope scope) {
endVisit(qualifiedSuperReference);
}
+ @Override
public void endVisit(QualifiedThisReference qualifiedThisReference, BlockScope scope) {
endVisit(qualifiedThisReference);
}
+ @Override
public void endVisit(QualifiedTypeReference qualifiedTypeReference, BlockScope scope) {
endVisit(qualifiedTypeReference);
}
+ @Override
public void endVisit(QualifiedTypeReference qualifiedTypeReference, ClassScope scope) {
endVisit(qualifiedTypeReference);
}
@@ -138,126 +170,166 @@
public void endVisit(ReferenceExpression referenceExpression, BlockScope blockScope) {
endVisit(referenceExpression);
}
+ @Override
public void endVisit(SingleNameReference singleNameReference, BlockScope scope) {
endVisit(singleNameReference);
}
+ @Override
public void endVisit(SingleTypeReference singleTypeReference, BlockScope scope) {
endVisit(singleTypeReference);
}
+ @Override
public void endVisit(SingleTypeReference singleTypeReference, ClassScope scope) {
endVisit(singleTypeReference);
}
+ @Override
public void endVisit(SuperReference superReference, BlockScope scope) {
endVisit(superReference);
}
+ @Override
public void endVisit(ThisReference thisReference, BlockScope scope) {
endVisit(thisReference);
}
+ @Override
public void endVisit(UnaryExpression unaryExpression, BlockScope scope) {
endVisit(unaryExpression);
}
+ @Override
public void endVisit(MemberValuePair pair, BlockScope scope) {
endVisit(pair);
}
public void endVisit(MemberValuePair pair, CompilationUnitScope scope) {
endVisit(pair);
}
+ @Override
public void endVisit(LambdaExpression lambda, BlockScope scope) {
endVisit(lambda);
}
+ @Override
public boolean visit(AllocationExpression allocationExpression, BlockScope scope) {
return this.visit(allocationExpression);
}
+ @Override
public boolean visit(AND_AND_Expression and_and_Expression, BlockScope scope) {
return this.visit(and_and_Expression);
}
+ @Override
public boolean visit(ArrayAllocationExpression arrayAllocationExpression, BlockScope scope) {
return this.visit(arrayAllocationExpression);
}
+ @Override
public boolean visit(ArrayInitializer arrayInitializer, BlockScope scope) {
return this.visit(arrayInitializer);
}
+ @Override
public boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, BlockScope scope) {
return this.visit(arrayQualifiedTypeReference);
}
+ @Override
public boolean visit(ArrayQualifiedTypeReference arrayQualifiedTypeReference, ClassScope scope) {
return this.visit(arrayQualifiedTypeReference);
}
+ @Override
public boolean visit(ArrayReference arrayReference, BlockScope scope) {
return this.visit(arrayReference);
}
+ @Override
public boolean visit(ArrayTypeReference arrayTypeReference, BlockScope scope) {
return this.visit(arrayTypeReference);
}
+ @Override
public boolean visit(ArrayTypeReference arrayTypeReference, ClassScope scope) {
return this.visit(arrayTypeReference);
}
+ @Override
public boolean visit(Assignment assignment, BlockScope scope) {
return this.visit(assignment);
}
+ @Override
public boolean visit(BinaryExpression binaryExpression, BlockScope scope) {
return this.visit(binaryExpression);
}
+ @Override
public boolean visit(CastExpression castExpression, BlockScope scope) {
return this.visit(castExpression);
}
+ @Override
public boolean visit(CompoundAssignment compoundAssignment, BlockScope scope) {
return this.visit(compoundAssignment);
}
+ @Override
public boolean visit(ConditionalExpression conditionalExpression, BlockScope scope) {
return this.visit(conditionalExpression);
}
+ @Override
public boolean visit(EqualExpression equalExpression, BlockScope scope) {
return this.visit(equalExpression);
}
+ @Override
public boolean visit(ExplicitConstructorCall explicitConstructor, BlockScope scope) {
return this.visit(explicitConstructor);
}
+ @Override
public boolean visit(FieldReference fieldReference, BlockScope scope) {
return this.visit(fieldReference);
}
+ @Override
public boolean visit(InstanceOfExpression instanceOfExpression, BlockScope scope) {
return this.visit(instanceOfExpression);
}
+ @Override
public boolean visit(MessageSend messageSend, BlockScope scope) {
return this.visit(messageSend);
}
+ @Override
public boolean visit(OR_OR_Expression or_or_Expression, BlockScope scope) {
return this.visit(or_or_Expression);
}
+ @Override
public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, BlockScope scope) {
return this.visit(parameterizedQualifiedTypeReference);
}
+ @Override
public boolean visit(ParameterizedQualifiedTypeReference parameterizedQualifiedTypeReference, ClassScope scope) {
return this.visit(parameterizedQualifiedTypeReference);
}
+ @Override
public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, BlockScope scope) {
return this.visit(parameterizedSingleTypeReference);
}
+ @Override
public boolean visit(ParameterizedSingleTypeReference parameterizedSingleTypeReference, ClassScope scope) {
return this.visit(parameterizedSingleTypeReference);
}
+ @Override
public boolean visit(PostfixExpression postfixExpression, BlockScope scope) {
return this.visit(postfixExpression);
}
+ @Override
public boolean visit(PrefixExpression prefixExpression, BlockScope scope) {
return this.visit(prefixExpression);
}
+ @Override
public boolean visit(QualifiedAllocationExpression qualifiedAllocationExpression, BlockScope scope) {
return this.visit(qualifiedAllocationExpression);
}
+ @Override
public boolean visit(QualifiedNameReference qualifiedNameReference, BlockScope scope) {
return this.visit(qualifiedNameReference);
}
+ @Override
public boolean visit(QualifiedSuperReference qualifiedSuperReference, BlockScope scope) {
return this.visit(qualifiedSuperReference);
}
+ @Override
public boolean visit(QualifiedThisReference qualifiedThisReference, BlockScope scope) {
return this.visit(qualifiedThisReference);
}
+ @Override
public boolean visit(QualifiedTypeReference qualifiedTypeReference, BlockScope scope) {
return this.visit(qualifiedTypeReference);
}
+ @Override
public boolean visit(QualifiedTypeReference qualifiedTypeReference, ClassScope scope) {
return this.visit(qualifiedTypeReference);
}
@@ -265,27 +337,35 @@
public boolean visit(ReferenceExpression referenceExpression, BlockScope blockScope) {
return this.visit(referenceExpression);
}
+ @Override
public boolean visit(SingleNameReference singleNameReference, BlockScope scope) {
return this.visit(singleNameReference);
}
+ @Override
public boolean visit(SingleTypeReference singleTypeReference, BlockScope scope) {
return this.visit(singleTypeReference);
}
+ @Override
public boolean visit(SingleTypeReference singleTypeReference, ClassScope scope) {
return this.visit(singleTypeReference);
}
+ @Override
public boolean visit(StringLiteral stringLiteral, BlockScope scope) {
return this.visit(stringLiteral);
}
+ @Override
public boolean visit(SuperReference superReference, BlockScope scope) {
return this.visit(superReference);
}
+ @Override
public boolean visit(ThisReference thisReference, BlockScope scope) {
return this.visit(thisReference);
}
+ @Override
public boolean visit(UnaryExpression unaryExpression, BlockScope scope) {
return this.visit(unaryExpression);
}
+ @Override
public boolean visit(MemberValuePair pair, BlockScope scope) {
return this.visit(pair);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationMemberValuePair.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationMemberValuePair.java
index 6496eff..a68fb55 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationMemberValuePair.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationMemberValuePair.java
@@ -24,6 +24,7 @@
this.completedMemberValuePair = completedMemberValuePair;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
super.resolveType(scope);
@@ -34,6 +35,7 @@
}
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append('@');
this.type.printExpression(0, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationOfType.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationOfType.java
index cfae076..49aa88e 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationOfType.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnAnnotationOfType.java
@@ -29,6 +29,7 @@
this.annotations = new Annotation[]{annotation};
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
return this.annotations[0].print(indent, output);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java
index c5a7154..d078fbb 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnArgumentName.java
@@ -32,12 +32,14 @@
this.realName = name;
}
+ @Override
public TypeBinding bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
super.bind(scope, typeBinding, used);
throw new CompletionNodeFound(this, scope);
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
@@ -51,6 +53,7 @@
return output.append('>');
}
+ @Override
public void resolve(BlockScope scope) {
super.resolve(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnBranchStatementLabel.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnBranchStatementLabel.java
index 1c940d5..c628c75 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnBranchStatementLabel.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnBranchStatementLabel.java
@@ -28,15 +28,18 @@
this.possibleLabels = possibleLabels;
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope,
FlowContext flowContext, FlowInfo flowInfo) {
// Is never called
return null;
}
+ @Override
public void resolve(BlockScope scope) {
throw new CompletionNodeFound(this, scope);
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
if(this.kind == CONTINUE) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java
index e7c1266..a66e614 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnClassLiteralAccess.java
@@ -45,12 +45,14 @@
this.classStart = (int) (pos >>> 32);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnClassLiteralAccess:"); //$NON-NLS-1$
return this.type.print(0, output).append('.').append(this.completionIdentifier).append('>');
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
if (super.resolveType(scope) == null)
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java
index f2df9b7..f285fff 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExplicitConstructorCall.java
@@ -41,6 +41,7 @@
super(accessMode);
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output);
@@ -60,6 +61,7 @@
return output.append(")>;"); //$NON-NLS-1$
}
+ @Override
public void resolve(BlockScope scope) {
ReferenceBinding receiverType = scope.enclosingSourceType();
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExportReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExportReference.java
index 0f8ff29..d1e1bf0 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExportReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnExportReference.java
@@ -37,6 +37,7 @@
public CompletionOnExportReference(ImportReference ref) {
super(ref, null);
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output).append("<CompleteOnExport:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldName.java
index ed687da..63e5395 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldName.java
@@ -22,6 +22,7 @@
this.realName = name;
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output).append("<CompleteOnFieldName:"); //$NON-NLS-1$
@@ -34,6 +35,7 @@
return output.append(">;"); //$NON-NLS-1$
}
+ @Override
public void resolve(MethodScope initializationScope) {
super.resolve(initializationScope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldType.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldType.java
index 8111049..2771f52 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldType.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnFieldType.java
@@ -49,6 +49,7 @@
}
}
+@Override
public StringBuffer printStatement(int tab, StringBuffer output) {
return this.type.print(tab, output).append(';');
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnImportReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnImportReference.java
index ea94bc0..92e21ef 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnImportReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnImportReference.java
@@ -39,6 +39,7 @@
public CompletionOnImportReference(char[][] tokens , long[] positions, int modifiers) {
super(tokens, positions, false, modifiers);
}
+@Override
public StringBuffer print(int indent, StringBuffer output, boolean withOnDemand) {
printIndent(indent, output).append("<CompleteOnImport:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocAllocationExpression.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocAllocationExpression.java
index c2c1c4d..1e80115 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocAllocationExpression.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocAllocationExpression.java
@@ -34,6 +34,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -59,6 +60,7 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
@@ -66,6 +68,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.AllocationExpression#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnJavadocAllocationExpression:"); //$NON-NLS-1$
super.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocFieldReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocFieldReference.java
index 4576958..5e606d1 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocFieldReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocFieldReference.java
@@ -53,6 +53,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -78,6 +79,7 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
@@ -85,6 +87,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.JavadocFieldReference#internalResolveType(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
+ @Override
protected TypeBinding internalResolveType(Scope scope) {
if (this.token != null) {
@@ -105,6 +108,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.JavadocFieldReference#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnJavadocFieldReference:"); //$NON-NLS-1$
super.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocMessageSend.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocMessageSend.java
index 133c34b..a56b662 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocMessageSend.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocMessageSend.java
@@ -33,6 +33,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -58,6 +59,7 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
@@ -65,6 +67,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.JavadocMessageSend#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnJavadocMessageSend:"); //$NON-NLS-1$
super.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocParamNameReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocParamNameReference.java
index d5723ee..7576ab4 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocParamNameReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocParamNameReference.java
@@ -30,6 +30,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -39,6 +40,7 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
@@ -46,6 +48,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.AllocationExpression#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompletionOnJavadocParamNameReference:"); //$NON-NLS-1$
if (this.token != null) super.printExpression(indent, output);
@@ -55,6 +58,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.SingleNameReference#reportError(org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public TypeBinding reportError(BlockScope scope) {
return null;
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocQualifiedTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocQualifiedTypeReference.java
index f6e4a31..10dc02c 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocQualifiedTypeReference.java
@@ -30,6 +30,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -55,12 +56,14 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompletionOnJavadocQualifiedTypeReference:"); //$NON-NLS-1$
super.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocSingleTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocSingleTypeReference.java
index eaafd6d..a7bac41 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocSingleTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocSingleTypeReference.java
@@ -27,6 +27,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -57,6 +58,7 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
@@ -64,6 +66,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.SingleTypeReference#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompletionOnJavadocSingleTypeReference:"); //$NON-NLS-1$
super.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTag.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTag.java
index afaa1d9..4fb5394 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTag.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTag.java
@@ -33,6 +33,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -42,6 +43,7 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
@@ -49,6 +51,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.AllocationExpression#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnJavadocTag:"); //$NON-NLS-1$
output.append('@');
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTypeParamReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTypeParamReference.java
index 2ae2acf..620221f 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTypeParamReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnJavadocTypeParamReference.java
@@ -29,6 +29,7 @@
/**
* @param flags The completionFlags to set.
*/
+ @Override
public void addCompletionFlags(int flags) {
this.completionFlags |= flags;
}
@@ -38,6 +39,7 @@
*
* @return int Flags of the javadoc completion node.
*/
+ @Override
public int getCompletionFlags() {
return this.completionFlags;
}
@@ -45,6 +47,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.AllocationExpression#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompletionOnJavadocTypeParamReference:"); //$NON-NLS-1$
if (this.token != null) super.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword1.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword1.java
index 7bd9125..6371f17 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword1.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword1.java
@@ -24,18 +24,23 @@
super(token, pos);
this.possibleKeywords = possibleKeywords;
}
+ @Override
public char[] getToken() {
return this.token;
}
+ @Override
public char[][] getPossibleKeywords() {
return this.possibleKeywords;
}
+ @Override
public void aboutToResolve(Scope scope) {
getTypeBinding(scope);
}
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
throw new CompletionNodeFound(this, scope);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
return output.append("<CompleteOnKeyword:").append(this.token).append('>'); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword2.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword2.java
index 017f200..6ad6762 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword2.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword2.java
@@ -21,12 +21,15 @@
this.token = token;
this.possibleKeywords = possibleKeywords;
}
+ @Override
public char[] getToken() {
return this.token;
}
+ @Override
public char[][] getPossibleKeywords() {
return this.possibleKeywords;
}
+ @Override
public StringBuffer print(int indent, StringBuffer output, boolean withOnDemand) {
return printIndent(indent, output).append("<CompleteOnKeyword:").append(this.token).append('>'); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword3.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword3.java
index bd91db2..2f0d982 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword3.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnKeyword3.java
@@ -26,19 +26,23 @@
this.possibleKeywords = possibleKeywords;
this.tryOrCatch = afterTryOrCatch;
}
+ @Override
public char[] getToken() {
return this.token;
}
+ @Override
public char[][] getPossibleKeywords() {
return this.possibleKeywords;
}
public boolean afterTryOrCatch() {
return this.tryOrCatch;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return output.append("<CompleteOnKeyword:").append(this.token).append('>'); //$NON-NLS-1$
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
throw new CompletionNodeFound(this, scope);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnLocalName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnLocalName.java
index f59f03d..e98b654 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnLocalName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnLocalName.java
@@ -25,12 +25,14 @@
this.realName = name;
}
+ @Override
public void resolve(BlockScope scope) {
super.resolve(scope);
throw new CompletionNodeFound(this, scope);
}
+ @Override
public StringBuffer printAsExpression(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("<CompleteOnLocalName:"); //$NON-NLS-1$
@@ -43,6 +45,7 @@
return output.append('>');
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printAsExpression(indent, output);
return output.append(';');
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMarkerAnnotationName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMarkerAnnotationName.java
index a802d93..6f523a7 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMarkerAnnotationName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMarkerAnnotationName.java
@@ -22,6 +22,7 @@
super(type, sourceStart);
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
if(this.type instanceof QualifiedTypeReference) {
QualifiedTypeReference qualifiedTypeReference = (QualifiedTypeReference) this.type;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberAccess.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberAccess.java
index 913d246..102b269 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberAccess.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberAccess.java
@@ -52,12 +52,14 @@
this.isInsideAnnotation = isInsideAnnotation;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnMemberAccess:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.actualReceiverType = this.receiver.resolveType(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberValueName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberValueName.java
index 913afd6..e1d5825 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberValueName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMemberValueName.java
@@ -30,6 +30,7 @@
super(token, sourceStart, sourceEnd, null);
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
output.append("<CompleteOnAttributeName:"); //$NON-NLS-1$
output.append(this.name);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java
index 7a573a4..92de1cd 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSend.java
@@ -38,6 +38,7 @@
public class CompletionOnMessageSend extends MessageSend {
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (this.arguments != null) {
@@ -58,6 +59,7 @@
throw new CompletionNodeFound(this, this.actualReceiverType, scope);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnMessageSend:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java
index 2b4a235..a5affd5 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMessageSendName.java
@@ -24,6 +24,7 @@
this.nameSourcePosition = end;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
@@ -47,6 +48,7 @@
throw new CompletionNodeFound(this, this.actualReceiverType, scope);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnMessageSendName:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodName.java
index 43ad896..144f919 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodName.java
@@ -21,6 +21,7 @@
super(compilationResult);
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
@@ -45,6 +46,7 @@
return output.append('>');
}
+ @Override
public void resolve(ClassScope upperScope) {
super.resolve(upperScope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodReturnType.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodReturnType.java
index 9e4509b..1df9154 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodReturnType.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodReturnType.java
@@ -22,10 +22,12 @@
this.sourceEnd = returnType.sourceEnd;
}
+ @Override
public void resolveStatements() {
throw new CompletionNodeFound(this, this.scope);
}
+ @Override
public StringBuffer print(int tab, StringBuffer output) {
return this.returnType.print(tab, output);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodTypeParameter.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodTypeParameter.java
index 7d0b289..b2dbc80 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodTypeParameter.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnMethodTypeParameter.java
@@ -24,10 +24,12 @@
this.sourceEnd = typeParameters[typeParameters.length - 1].sourceEnd;
}
+ @Override
public void resolveStatements() {
throw new CompletionNodeFound(this, this.scope);
}
+ @Override
public StringBuffer print(int tab, StringBuffer output) {
printIndent(tab, output);
output.append('<');
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnModuleReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnModuleReference.java
index 7ccea8c..f08f3da 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnModuleReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnModuleReference.java
@@ -24,6 +24,7 @@
super(tokens, sourcePositions);
}
+ @Override
public ModuleBinding resolve(Scope scope) {
super.resolve(scope);
// if (this.binding != null) {
@@ -32,6 +33,7 @@
throw new CompletionNodeFound();
//}
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output).append("<CompleteOnModuleReference:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageReference.java
index fe6d941..2c1ae0f 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageReference.java
@@ -47,6 +47,7 @@
super(tokens, positions, false, modifiers);
// SH}
}
+@Override
public StringBuffer print(int indent, StringBuffer output, boolean withOnDemand) {
printIndent(indent, output).append("<CompleteOnPackage:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageVisibilityReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageVisibilityReference.java
index aad8358..742fdf7 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageVisibilityReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnPackageVisibilityReference.java
@@ -42,6 +42,7 @@
this.pkgName = new String(CharOperation.concatWith(ident, '.'));
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output).append("<CompleteOnPackageVisibilityReference:"); //$NON-NLS-1$
output.append(this.pkgName);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java
index 7a9f66e..dc5f4ac 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnParameterizedQualifiedTypeReference.java
@@ -78,16 +78,19 @@
return this.kind == K_CLASS || this.kind == K_INTERFACE;
}
+ @Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
super.resolveType(scope, checkBounds, location);
throw new CompletionNodeFound(this, this.resolvedType, scope);
}
+ @Override
public TypeBinding resolveType(ClassScope scope, int location) {
super.resolveType(scope, location);
throw new CompletionNodeFound(this, this.resolvedType, scope);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
switch (this.kind) {
case K_CLASS :
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java
index 3e4d88c..ce3c197 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedAllocationExpression.java
@@ -38,6 +38,7 @@
import org.eclipse.jdt.internal.compiler.lookup.*;
public class CompletionOnQualifiedAllocationExpression extends QualifiedAllocationExpression {
+@Override
public TypeBinding resolveType(BlockScope scope) {
this.argumentTypes = Binding.NO_PARAMETERS;
if (this.arguments != null) {
@@ -95,6 +96,7 @@
throw new CompletionNodeFound(this, this.resolvedType, scope);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
if (this.enclosingInstance == null)
output.append("<CompleteOnAllocationExpression:" ); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java
index aebf748..6ce9360 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedNameReference.java
@@ -45,6 +45,7 @@
this.completionIdentifier = completionIdentifier;
this.isInsideAnnotationAttribute = isInsideAnnotationAttribute;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnName:"); //$NON-NLS-1$
@@ -55,6 +56,7 @@
output.append(this.completionIdentifier).append('>');
return output;
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// it can be a package, type, member type, local variable or field
this.binding = scope.getBinding(this.tokens, this);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java
index 6e4507d..a4148da 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnQualifiedTypeReference.java
@@ -46,15 +46,18 @@
this.completionIdentifier = completionIdentifier;
this.kind = kind;
}
+@Override
public void aboutToResolve(Scope scope) {
getTypeBinding(scope);
}
/*
* No expansion of the completion reference into an array one
*/
+@Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
return this;
}
+@Override
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.parent.getTypeOrPackage(this.tokens); // step up from the ClassScope
@@ -88,6 +91,7 @@
public void setKind(int kind) {
this.kind = kind;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
switch (this.kind) {
case K_CLASS :
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleNameReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleNameReference.java
index 09dd2da..2d36026 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleNameReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleNameReference.java
@@ -65,12 +65,14 @@
this.isInsideAnnotationAttribute = isInsideAnnotationAttribute;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompleteOnName:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
if(scope instanceof MethodScope) {
throw new CompletionNodeFound(this, scope, ((MethodScope)scope).insideTypeAnnotation);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java
index 6f60fbe..3d60bc3 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnSingleTypeReference.java
@@ -49,15 +49,18 @@
this.isCompletionNode = true;
this.kind = kind;
}
+@Override
public void aboutToResolve(Scope scope) {
getTypeBinding(scope);
}
/*
* No expansion of the completion reference into an array one
*/
+@Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
return this;
}
+@Override
protected TypeBinding getTypeBinding(Scope scope) {
if (this.fieldTypeCompletionNode != null) {
throw new CompletionNodeFound(this.fieldTypeCompletionNode, scope);
@@ -80,6 +83,7 @@
public boolean isSuperType(){
return this.kind == K_CLASS || this.kind == K_INTERFACE;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output){
switch (this.kind) {
case K_CLASS :
@@ -97,6 +101,7 @@
}
return output.append(this.token).append('>');
}
+@Override
public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
if (this.fieldTypeCompletionNode != null) {
throw new CompletionNodeFound(this.fieldTypeCompletionNode, scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java
index 4f98b25..e6c0828 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionOnStringLiteral.java
@@ -47,13 +47,16 @@
this.contentStart = cs;
this.contentEnd = ce;
}
+ @Override
public TypeBinding resolveType(ClassScope scope) {
throw new CompletionNodeFound(this, null, scope);
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
throw new CompletionNodeFound(this, null, scope);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<CompletionOnString:"); //$NON-NLS-1$
output = super.printExpression(indent, output);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
index 58e216c..8733c25 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionParser.java
@@ -261,6 +261,7 @@
this.record = true;
this.skipRecord = false;
}
+@Override
public char[] assistIdentifier(){
return ((CompletionScanner)this.scanner).completionIdentifier;
}
@@ -690,6 +691,7 @@
}
}
}
+@Override
public Object becomeSimpleParser() {
CompletionScanner completionScanner = (CompletionScanner)this.scanner;
int[] parserState = new int[] {this.cursorLocation, completionScanner.cursorLocation};
@@ -1379,6 +1381,7 @@
this.currentElement = this.currentElement.add(exceptionRef, 0);
}
}
+@Override
public int bodyEnd(AbstractMethodDeclaration method){
return this.cursorLocation;
}
@@ -1388,9 +1391,11 @@
return this.cursorLocation;
}
// SH}
+@Override
public int bodyEnd(Initializer initializer){
return this.cursorLocation;
}
+@Override
protected void checkAndSetModifiers(int flag) {
super.checkAndSetModifiers(flag);
@@ -1398,6 +1403,7 @@
this.hasUnusedModifiers = true;
}
}
+@Override
protected void consumePushCombineModifiers() {
super.consumePushCombineModifiers();
@@ -2494,25 +2500,31 @@
if (checkLabelStatement()) return;
if (checkNameCompletion()) return;
}
+@Override
protected void consumeArrayCreationExpressionWithInitializer() {
super.consumeArrayCreationExpressionWithInitializer();
popElement(K_ARRAY_CREATION);
}
+@Override
protected void consumeArrayCreationExpressionWithoutInitializer() {
super.consumeArrayCreationExpressionWithoutInitializer();
popElement(K_ARRAY_CREATION);
}
+@Override
protected void consumeArrayCreationHeader() {
// nothing to do
}
+@Override
protected void consumeAssignment() {
popElement(K_ASSISGNMENT_OPERATOR);
super.consumeAssignment();
}
+@Override
protected void consumeAssignmentOperator(int pos) {
super.consumeAssignmentOperator(pos);
pushOnElementStack(K_ASSISGNMENT_OPERATOR, pos);
}
+@Override
protected void consumeBinaryExpression(int op) {
super.consumeBinaryExpression(op);
popElement(K_BINARY_OPERATOR);
@@ -2525,15 +2537,18 @@
}
}
//{ObjectTeams: after a callout/callin binding left expect another method spec:
+@Override
protected void consumeCalloutBindingLeft(boolean hasSignature) {
super.consumeCalloutBindingLeft(hasSignature);
pushOnElementStack(K_EXPECTING_RIGHT_METHODSPEC);
}
+@Override
protected void consumeCallinBindingLeft(boolean hasSignature) {
super.consumeCallinBindingLeft(hasSignature);
pushOnElementStack(K_EXPECTING_RIGHT_METHODSPEC);
}
// SH}
+@Override
protected void consumeBinaryExpressionWithName(int op) {
super.consumeBinaryExpressionWithName(op);
popElement(K_BINARY_OPERATOR);
@@ -2545,12 +2560,14 @@
}
}
}
+@Override
protected void consumeCaseLabel() {
super.consumeCaseLabel();
if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) != K_SWITCH_LABEL) {
pushOnElementStack(K_SWITCH_LABEL);
}
}
+@Override
protected void consumeCastExpressionWithPrimitiveType() {
popElement(K_CAST_STATEMENT);
@@ -2563,6 +2580,7 @@
cast.sourceStart = castType.sourceStart - 1;
cast.sourceEnd = exp.sourceEnd;
}
+@Override
protected void consumeCastExpressionWithGenericsArray() {
popElement(K_CAST_STATEMENT);
@@ -2576,6 +2594,7 @@
cast.sourceEnd = exp.sourceEnd;
}
+@Override
protected void consumeCastExpressionWithQualifiedGenericsArray() {
popElement(K_CAST_STATEMENT);
@@ -2588,6 +2607,7 @@
cast.sourceStart = castType.sourceStart - 1;
cast.sourceEnd = exp.sourceEnd;
}
+@Override
protected void consumeCastExpressionWithNameArray() {
// CastExpression ::= PushLPAREN Name Dims PushRPAREN InsideCastExpression UnaryExpressionNotPlusMinus
popElement(K_CAST_STATEMENT);
@@ -2601,10 +2621,12 @@
cast.sourceStart = castType.sourceStart - 1;
cast.sourceEnd = exp.sourceEnd;
}
+@Override
protected void consumeCastExpressionLL1() {
popElement(K_CAST_STATEMENT);
super.consumeCastExpressionLL1();
}
+@Override
protected void consumeCatchFormalParameter() {
if (this.indexOfAssistIdentifier() < 0) {
super.consumeCatchFormalParameter();
@@ -2649,11 +2671,13 @@
this.listLength++;
}
}
+@Override
protected void consumeClassBodyDeclaration() {
popElement(K_BLOCK_DELIMITER);
super.consumeClassBodyDeclaration();
this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
}
+@Override
protected void consumeClassBodyopt() {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
@@ -2662,6 +2686,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.Parser#consumeClassDeclaration()
*/
+@Override
protected void consumeClassDeclaration() {
if (this.astPtr >= 0) {
int length = this.astLengthStack[this.astLengthPtr];
@@ -2678,6 +2703,7 @@
}
super.consumeClassDeclaration();
}
+@Override
protected void consumeClassHeaderName1() {
super.consumeClassHeaderName1();
this.hasUnusedModifiers = false;
@@ -2688,6 +2714,7 @@
classHeaderExtendsOrImplements(false);
}
+@Override
protected void consumeClassHeaderExtends() {
pushOnElementStack(K_NEXT_TYPEREF_IS_CLASS);
super.consumeClassHeaderExtends();
@@ -2726,6 +2753,7 @@
}
}
}
+@Override
protected void consumeClassHeaderImplements() {
super.consumeClassHeaderImplements();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -2741,11 +2769,13 @@
}
}
}
+@Override
protected void consumeClassInstanceCreationExpressionName() {
super.consumeClassInstanceCreationExpressionName();
this.invocationType = QUALIFIED_ALLOCATION;
this.qualifier = this.expressionPtr;
}
+@Override
protected void consumeClassTypeElt() {
pushOnElementStack(K_NEXT_TYPEREF_IS_EXCEPTION);
super.consumeClassTypeElt();
@@ -2755,6 +2785,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.parser.Parser#consumeCompilationUnit()
*/
+@Override
protected void consumeCompilationUnit() {
this.javadoc = null;
checkComment();
@@ -2772,22 +2803,27 @@
}
super.consumeCompilationUnit();
}
+@Override
protected void consumeConditionalExpression(int op) {
popElement(K_CONDITIONAL_OPERATOR);
super.consumeConditionalExpression(op);
}
+@Override
protected void consumeConditionalExpressionWithName(int op) {
popElement(K_CONDITIONAL_OPERATOR);
super.consumeConditionalExpressionWithName(op);
}
+@Override
protected void consumeConstructorBody() {
popElement(K_BLOCK_DELIMITER);
super.consumeConstructorBody();
}
+@Override
protected void consumeConstructorHeader() {
super.consumeConstructorHeader();
pushOnElementStack(K_BLOCK_DELIMITER);
}
+@Override
protected void consumeConstructorHeaderName() {
/* no need to take action if not inside assist identifiers */
@@ -2819,6 +2855,7 @@
pushOnGenericsLengthStack(0); // handle type arguments
this.restartRecovery = true;
}
+@Override
protected void consumeConstructorHeaderNameWithTypeParameters() {
long selectorSourcePositions = this.identifierPositionStack[this.identifierPtr];
int selectorSourceEnd = (int) selectorSourcePositions;
@@ -2836,6 +2873,7 @@
this.sourceEnds.put(this.astStack[this.astPtr], selectorSourceEnd);
}
}
+@Override
protected void consumeDefaultLabel() {
super.consumeDefaultLabel();
if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SWITCH_LABEL) {
@@ -2843,10 +2881,12 @@
}
pushOnElementStack(K_SWITCH_LABEL, DEFAULT);
}
+@Override
protected void consumeDimWithOrWithOutExpr() {
// DimWithOrWithOutExpr ::= '[' ']'
pushOnExpressionStack(null);
}
+@Override
protected void consumeEmptyStatement() {
super.consumeEmptyStatement();
/* Sneak in the assist node. The reason we can't do that when we see the assist node is that
@@ -2866,6 +2906,7 @@
this.shouldStackAssistNode = false;
}
}
+@Override
protected void consumeEnhancedForStatement() {
super.consumeEnhancedForStatement();
@@ -2873,6 +2914,7 @@
popElement(K_CONTROL_STATEMENT_DELIMITER);
}
}
+@Override
protected void consumeEnhancedForStatementHeaderInit(boolean hasModifiers) {
super.consumeEnhancedForStatementHeaderInit(hasModifiers);
this.hasUnusedModifiers = false;
@@ -2881,11 +2923,13 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumeEnterAnonymousClassBody(boolean qualified) {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeEnterAnonymousClassBody(qualified);
}
+@Override
protected void consumeEnterVariable() {
this.identifierPtr--;
this.identifierLengthPtr--;
@@ -2958,6 +3002,7 @@
}
}
}
+@Override
protected void consumeEnumConstantHeaderName() {
if (this.currentElement != null) {
if (!(this.currentElement instanceof RecoveredType
@@ -2973,6 +3018,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumeEnumConstantNoClassBody() {
super.consumeEnumConstantNoClassBody();
if ((this.currentToken == TokenNameCOMMA || this.currentToken == TokenNameSEMICOLON)
@@ -2982,6 +3028,7 @@
}
}
}
+@Override
protected void consumeEnumConstantWithClassBody() {
super.consumeEnumConstantWithClassBody();
if ((this.currentToken == TokenNameCOMMA || this.currentToken == TokenNameSEMICOLON)
@@ -2991,6 +3038,7 @@
}
}
}
+@Override
protected void consumeEnumHeaderName() {
super.consumeEnumHeaderName();
this.hasUnusedModifiers = false;
@@ -2999,6 +3047,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumeEnumHeaderNameWithTypeParameters() {
super.consumeEnumHeaderNameWithTypeParameters();
if (this.pendingAnnotation != null) {
@@ -3006,6 +3055,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumeEqualityExpression(int op) {
super.consumeEqualityExpression(op);
popElement(K_BINARY_OPERATOR);
@@ -3015,6 +3065,7 @@
this.assistNodeParent = exp;
}
}
+@Override
protected void consumeEqualityExpressionWithName(int op) {
super.consumeEqualityExpressionWithName(op);
popElement(K_BINARY_OPERATOR);
@@ -3024,6 +3075,7 @@
this.assistNodeParent = exp;
}
}
+@Override
protected void consumeExitVariableWithInitialization() {
super.consumeExitVariableWithInitialization();
if ((this.currentToken == TokenNameCOMMA || this.currentToken == TokenNameSEMICOLON)
@@ -3047,6 +3099,7 @@
}
}
}
+@Override
protected void consumeExitVariableWithoutInitialization() {
// ExitVariableWithoutInitialization ::= $empty
// do nothing by default
@@ -3058,6 +3111,7 @@
}
}
}
+@Override
protected void consumeExplicitConstructorInvocation(int flag, int recFlag) {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
@@ -3088,6 +3142,7 @@
* If the cursor location is on the field access, then create a
* CompletionOnMemberAccess instead.
*/
+@Override
protected void consumeFieldAccess(boolean isSuperAccess) {
// FieldAccess ::= Primary '.' 'Identifier'
// FieldAccess ::= 'super' '.' 'Identifier'
@@ -3102,6 +3157,7 @@
pushCompletionOnMemberAccessOnExpressionStack(isSuperAccess);
}
}
+@Override
protected void consumeForceNoDiet() {
super.consumeForceNoDiet();
if (isInsideMethod()) {
@@ -3112,6 +3168,7 @@
pushOnElementStack(K_METHOD_DELIMITER);
// SH}
}
+@Override
protected void consumeFormalParameter(boolean isVarArgs) {
this.invocationType = NO_RECEIVER;
@@ -3198,6 +3255,7 @@
this.listLength++;
}
}
+@Override
protected void consumeGenericTypeWithDiamond() {
super.consumeGenericTypeWithDiamond();
// we need to pop the <> of the diamond from the stack.
@@ -3206,6 +3264,7 @@
popElement(K_BINARY_OPERATOR); // pop >
popElement(K_BINARY_OPERATOR); // pop <
}
+@Override
protected void consumeStatementFor() {
super.consumeStatementFor();
@@ -3213,6 +3272,7 @@
popElement(K_CONTROL_STATEMENT_DELIMITER);
}
}
+@Override
protected void consumeStatementIfNoElse() {
super.consumeStatementIfNoElse();
@@ -3220,6 +3280,7 @@
popElement(K_CONTROL_STATEMENT_DELIMITER);
}
}
+@Override
protected void consumeStatementIfWithElse() {
super.consumeStatementIfWithElse();
@@ -3227,6 +3288,7 @@
popElement(K_CONTROL_STATEMENT_DELIMITER);
}
}
+@Override
protected void consumeInsideCastExpression() {
TypeReference[] bounds = null;
int additionalBoundsLength = this.genericsLengthStack[this.genericsLengthPtr--];
@@ -3264,6 +3326,7 @@
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInsideCastExpressionLL1() {
if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_PARAMETERIZED_CAST) {
popElement(K_PARAMETERIZED_CAST);
@@ -3287,6 +3350,7 @@
}
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInsideCastExpressionLL1WithBounds() {
if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_PARAMETERIZED_CAST) {
popElement(K_PARAMETERIZED_CAST);
@@ -3313,6 +3377,7 @@
}
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInsideCastExpressionWithQualifiedGenerics() {
popElement(K_PARAMETERIZED_CAST);
@@ -3344,6 +3409,7 @@
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInstanceOfExpression() {
super.consumeInstanceOfExpression();
popElement(K_BINARY_OPERATOR);
@@ -3357,6 +3423,7 @@
this.assistNodeParent = exp;
}
}
+@Override
protected void consumeInstanceOfExpressionWithName() {
super.consumeInstanceOfExpressionWithName();
popElement(K_BINARY_OPERATOR);
@@ -3366,6 +3433,7 @@
this.assistNodeParent = exp;
}
}
+@Override
protected void consumeInterfaceHeaderName1() {
super.consumeInterfaceHeaderName1();
this.hasUnusedModifiers = false;
@@ -3375,67 +3443,80 @@
}
classHeaderExtendsOrImplements(true);
}
+@Override
protected void consumeInterfaceHeaderExtends() {
super.consumeInterfaceHeaderExtends();
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeInterfaceType() {
pushOnElementStack(K_NEXT_TYPEREF_IS_INTERFACE);
super.consumeInterfaceType();
popElement(K_NEXT_TYPEREF_IS_INTERFACE);
}
+@Override
protected void consumeMethodInvocationName() {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationName();
}
+@Override
protected void consumeMethodInvocationNameWithTypeArguments() {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationNameWithTypeArguments();
}
//{ObjectTeams:
+@Override
protected void consumeMethodInvocationBase(boolean isSuperAccess) {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationBase(isSuperAccess);
}
+@Override
protected void consumeMethodInvocationBaseWithTypeArguments(boolean isSuperAccess) {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationBaseWithTypeArguments(isSuperAccess);
}
+@Override
protected void consumeMethodInvocationTSuper(int kind) {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationTSuper(kind);
}
+@Override
protected void consumeMethodInvocationTSuperWithTypeArguments(int kind) {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationTSuperWithTypeArguments(kind);
}
// SH}
+@Override
protected void consumeMethodInvocationPrimary() {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationPrimary();
}
+@Override
protected void consumeMethodInvocationPrimaryWithTypeArguments() {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationPrimaryWithTypeArguments();
}
+@Override
protected void consumeMethodInvocationSuper() {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationSuper();
}
+@Override
protected void consumeMethodInvocationSuperWithTypeArguments() {
popElement(K_SELECTOR_QUALIFIER);
popElement(K_SELECTOR_INVOCATION_TYPE);
super.consumeMethodInvocationSuperWithTypeArguments();
}
+@Override
protected void consumeMethodHeaderName(boolean isAnnotationMethod) {
if(this.indexOfAssistIdentifier() < 0) {
this.identifierPtr--;
@@ -3573,6 +3654,7 @@
}
}
}
+@Override
protected void consumeMethodHeaderNameWithTypeParameters( boolean isAnnotationMethod) {
long selectorSourcePositions = this.identifierPositionStack[this.identifierPtr];
int selectorSourceEnd = (int) selectorSourcePositions;
@@ -3586,6 +3668,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumeMethodHeaderRightParen() {
super.consumeMethodHeaderRightParen();
@@ -3619,6 +3702,7 @@
}
}
}
+@Override
protected void consumeMethodHeaderExtendedDims() {
super.consumeMethodHeaderExtendedDims();
@@ -3650,6 +3734,7 @@
}
}
}
+@Override
protected void consumeAnnotationAsModifier() {
super.consumeAnnotationAsModifier();
@@ -3657,6 +3742,7 @@
this.hasUnusedModifiers = true;
}
}
+@Override
protected void consumeAdditionalBound() {
super.consumeAdditionalBound();
ASTNode node = this.genericsStack[this.genericsPtr];
@@ -3666,6 +3752,7 @@
((CompletionOnQualifiedTypeReference) node).setKind(CompletionOnQualifiedTypeReference.K_INTERFACE);
}
}
+@Override
protected void consumeAdditionalBound1() {
super.consumeAdditionalBound1();
ASTNode node = this.genericsStack[this.genericsPtr];
@@ -3675,6 +3762,7 @@
((CompletionOnQualifiedTypeReference) node).setKind(CompletionOnQualifiedTypeReference.K_INTERFACE);
}
}
+@Override
protected void consumeAnnotationName() {
int index;
@@ -3732,6 +3820,7 @@
this.pushOnElementStack(K_BETWEEN_ANNOTATION_NAME_AND_RPAREN, LPAREN_NOT_CONSUMED | ANNOTATION_NAME_COMPLETION);
}
+@Override
protected void consumeAnnotationTypeDeclarationHeaderName() {
super.consumeAnnotationTypeDeclarationHeaderName();
this.hasUnusedModifiers = false;
@@ -3740,6 +3829,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters() {
super.consumeAnnotationTypeDeclarationHeaderNameWithTypeParameters();
this.hasUnusedModifiers = false;
@@ -3748,6 +3838,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumeLabel() {
super.consumeLabel();
pushOnLabelStack(this.identifierStack[this.identifierPtr]);
@@ -3760,6 +3851,7 @@
if (this.assistNode == null || !(this.assistNode.sourceStart >= expression.sourceStart && this.assistNode.sourceEnd <= expression.sourceEnd))
popElement(K_LAMBDA_EXPRESSION_DELIMITER);
}
+@Override
protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
if (this.topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN &&
(this.topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) & ANNOTATION_NAME_COMPLETION) != 0 ) {
@@ -3770,6 +3862,7 @@
super.consumeMarkerAnnotation(isTypeAnnotation);
}
}
+@Override
protected void consumeMemberValuePair() {
/* check if current awaiting identifier is the completion identifier */
if (this.indexOfAssistIdentifier() < 0){
@@ -3798,6 +3891,7 @@
this.restartRecovery = true;
}
+@Override
protected void consumeMemberValueAsName() {
if ((indexOfAssistIdentifier()) < 0) {
super.consumeMemberValueAsName();
@@ -3809,20 +3903,24 @@
}
}
}
+@Override
protected void consumeMethodBody() {
popElement(K_BLOCK_DELIMITER);
super.consumeMethodBody();
}
+@Override
protected void consumeMethodHeader() {
super.consumeMethodHeader();
pushOnElementStack(K_BLOCK_DELIMITER);
}
+@Override
protected void consumeMethodDeclaration(boolean isNotAbstract, boolean isDefaultMethod) {
if (!isNotAbstract) {
popElement(K_BLOCK_DELIMITER);
}
super.consumeMethodDeclaration(isNotAbstract, isDefaultMethod);
}
+@Override
protected void consumeModifiers() {
super.consumeModifiers();
// save from stack values
@@ -3830,31 +3928,38 @@
this.lastModifiers = this.intStack[this.intPtr-1];
}
//{ObjectTeams: once we see a paramter mappings, don't wait for the right methodspec any more:
+@Override
protected void consumeParameterMappingsEmpty() {
super.consumeParameterMappingsEmpty();
popElement(K_EXPECTING_RIGHT_METHODSPEC);
}
+@Override
protected void consumeParameterMappingList() {
super.consumeParameterMappingList();
popElement(K_EXPECTING_RIGHT_METHODSPEC);
}
// SH}
+@Override
protected void consumeModuleHeader() {
super.consumeModuleHeader();
}
+@Override
protected void consumeProvidesInterface() {
super.consumeProvidesInterface();
pushOnElementStack(K_AFTER_NAME_IN_PROVIDES_STATEMENT);
}
+@Override
protected void consumeProvidesStatement() {
super.consumeProvidesStatement();
popElement(K_INSIDE_PROVIDES_STATEMENT);
}
+@Override
protected void consumeWithClause() {
super.consumeWithClause();
popElement(K_AFTER_WITH_IN_PROVIDES_STATEMENT);
}
+@Override
protected void consumeReferenceType() {
if (this.identifierLengthStack[this.identifierLengthPtr] > 1) { // reducing a qualified name
// potential receiver is being poped, so reset potential receiver
@@ -3863,10 +3968,12 @@
}
super.consumeReferenceType();
}
+@Override
protected void consumeRequiresStatement() {
super.consumeRequiresStatement();
popElement(K_INSIDE_REQUIRES_STATEMENT);
}
+@Override
protected void consumeRestoreDiet() {
super.consumeRestoreDiet();
if (isInsideMethod()) {
@@ -3878,15 +3985,18 @@
popElement(K_LOCAL_INITIALIZER_DELIMITER);
}
}
+@Override
protected void consumeExportsStatement() {
super.consumeExportsStatement();
popElement(K_AFTER_PACKAGE_IN_PACKAGE_VISIBILITY_STATEMENT);
popElement(K_INSIDE_EXPORTS_STATEMENT);
}
+@Override
protected void consumeSinglePkgName() {
super.consumeSinglePkgName();
pushOnElementStack(K_AFTER_PACKAGE_IN_PACKAGE_VISIBILITY_STATEMENT);
}
+@Override
protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
if (this.topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN &&
(this.topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) & ANNOTATION_NAME_COMPLETION) != 0 ) {
@@ -3897,6 +4007,7 @@
super.consumeSingleMemberAnnotation(isTypeAnnotation);
}
}
+@Override
protected void consumeSingleStaticImportDeclarationName() {
super.consumeSingleStaticImportDeclarationName();
this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
@@ -3908,10 +4019,12 @@
this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
}
// SH}
+@Override
protected void consumeSingleTypeImportDeclarationName() {
super.consumeSingleTypeImportDeclarationName();
this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
}
+@Override
protected void consumeStatementBreakWithLabel() {
super.consumeStatementBreakWithLabel();
if (this.record) {
@@ -3922,10 +4035,12 @@
}
}
+@Override
protected void consumeStatementLabel() {
popElement(K_LABEL);
super.consumeStatementLabel();
}
+@Override
protected void consumeStatementSwitch() {
super.consumeStatementSwitch();
if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_SWITCH_LABEL) {
@@ -3933,24 +4048,29 @@
popElement(K_BLOCK_DELIMITER);
}
}
+@Override
protected void consumeStatementWhile() {
super.consumeStatementWhile();
if (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_CONTROL_STATEMENT_DELIMITER) {
popElement(K_CONTROL_STATEMENT_DELIMITER);
}
}
+@Override
protected void consumeStaticImportOnDemandDeclarationName() {
super.consumeStaticImportOnDemandDeclarationName();
this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
}
+@Override
protected void consumeStaticInitializer() {
super.consumeStaticInitializer();
this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
}
+@Override
protected void consumeNestedMethod() {
super.consumeNestedMethod();
if(!(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BLOCK_DELIMITER)) pushOnElementStack(K_BLOCK_DELIMITER);
}
+@Override
protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
if (this.topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BETWEEN_ANNOTATION_NAME_AND_RPAREN &&
(this.topKnownElementInfo(COMPLETION_OR_ASSIST_PARSER) & ANNOTATION_NAME_COMPLETION) != 0 ) {
@@ -3978,6 +4098,7 @@
super.consumeNormalAnnotation(isTypeAnnotation);
}
}
+@Override
protected void consumePackageDeclarationName() {
super.consumePackageDeclarationName();
if (this.pendingAnnotation != null) {
@@ -3985,6 +4106,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumePackageDeclarationNameWithModifiers() {
super.consumePackageDeclarationNameWithModifiers();
if (this.pendingAnnotation != null) {
@@ -3992,6 +4114,7 @@
this.pendingAnnotation = null;
}
}
+@Override
protected void consumePrimaryNoNewArrayName() {
// this is class literal access, so reset potential receiver
this.invocationType = NO_RECEIVER;
@@ -3999,6 +4122,7 @@
super.consumePrimaryNoNewArrayName();
}
+@Override
protected void consumeQualifiedSuperReceiver() {
// this is class literal access, so reset potential receiver
this.invocationType = NO_RECEIVER;
@@ -4006,6 +4130,7 @@
super.consumeQualifiedSuperReceiver();
}
+@Override
protected void consumePrimaryNoNewArrayNameThis() {
// this is class literal access, so reset potential receiver
this.invocationType = NO_RECEIVER;
@@ -4013,6 +4138,7 @@
super.consumePrimaryNoNewArrayNameThis();
}
+@Override
protected void consumePushPosition() {
super.consumePushPosition();
if(topKnownElementKind(COMPLETION_OR_ASSIST_PARSER) == K_BINARY_OPERATOR) {
@@ -4021,6 +4147,7 @@
pushOnElementStack(K_UNARY_OPERATOR, info);
}
}
+@Override
protected void consumeToken(int token) {
if(this.isFirst) {
super.consumeToken(token);
@@ -4620,18 +4747,22 @@
}
}
}
+@Override
protected void consumeInvocationExpression() { // on error, a message send's error reductions will take the expression path rather than the statement path since that is a dead end.
super.consumeInvocationExpression();
triggerRecoveryUponLambdaClosure(this.expressionStack[this.expressionPtr], false);
}
+@Override
protected void consumeReferenceExpression(ReferenceExpression referenceExpression) {
this.inReferenceExpression = false;
super.consumeReferenceExpression(referenceExpression);
}
+@Override
protected void consumeOnlySynchronized() {
super.consumeOnlySynchronized();
this.hasUnusedModifiers = false;
}
+@Override
protected void consumeOnlyTypeArguments() {
super.consumeOnlyTypeArguments();
popElement(K_BINARY_OPERATOR);
@@ -4642,10 +4773,12 @@
popElement(K_PARAMETERIZED_ALLOCATION);
}
}
+@Override
protected void consumeOnlyTypeArgumentsForCastExpression() {
super.consumeOnlyTypeArgumentsForCastExpression();
pushOnElementStack(K_PARAMETERIZED_CAST);
}
+@Override
protected void consumeOpenFakeBlock() {
super.consumeOpenFakeBlock();
pushOnElementStack(K_BLOCK_DELIMITER);
@@ -4656,51 +4789,63 @@
popElement(K_AFTER_PACKAGE_IN_PACKAGE_VISIBILITY_STATEMENT);
popElement(K_INSIDE_OPENS_STATEMENT);
}
+@Override
protected void consumeRightParen() {
super.consumeRightParen();
}
+@Override
protected void consumeReferenceType1() {
super.consumeReferenceType1();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeReferenceType2() {
super.consumeReferenceType2();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeReferenceType3() {
super.consumeReferenceType3();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeTypeArgumentReferenceType1() {
super.consumeTypeArgumentReferenceType1();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeTypeArgumentReferenceType2() {
super.consumeTypeArgumentReferenceType2();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeTypeArguments() {
super.consumeTypeArguments();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeTypeHeaderNameWithTypeParameters() {
super.consumeTypeHeaderNameWithTypeParameters();
TypeDeclaration typeDecl = (TypeDeclaration)this.astStack[this.astPtr];
classHeaderExtendsOrImplements((typeDecl.modifiers & ClassFileConstants.AccInterface) != 0);
}
+@Override
protected void consumeTypeImportOnDemandDeclarationName() {
super.consumeTypeImportOnDemandDeclarationName();
this.pendingAnnotation = null; // the pending annotation cannot be attached to next nodes
}
+@Override
protected void consumeImportDeclaration() {
super.consumeImportDeclaration();
popElement(K_INSIDE_IMPORT_STATEMENT);
}
+@Override
protected void consumeTypeParameters() {
super.consumeTypeParameters();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeTypeParameterHeader() {
super.consumeTypeParameterHeader();
TypeParameter typeParameter = (TypeParameter) this.genericsStack[this.genericsPtr];
@@ -4730,11 +4875,13 @@
this.assistNode = typeParameter.type;
this.lastCheckPoint = typeParameter.type.sourceEnd + 1;
}
+@Override
protected void consumeTypeParameter1() {
super.consumeTypeParameter1();
popElement(K_BINARY_OPERATOR);
}
//{ObjectTeams: recognize incomplete <T extends>
+@Override
protected void consumeTypeValueParameter() {
if (this.genericsPtr > -1) {
TypeParameter param = (TypeParameter)this.genericsStack[this.genericsPtr];
@@ -4751,6 +4898,7 @@
popElement(K_BINARY_OPERATOR);
}
// SH}
+@Override
protected void consumeTypeParameterWithExtends() {
super.consumeTypeParameterWithExtends();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4760,6 +4908,7 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeTypeParameterWithExtendsAndBounds() {
super.consumeTypeParameterWithExtendsAndBounds();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4769,6 +4918,7 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeTypeParameter1WithExtends() {
super.consumeTypeParameter1WithExtends();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4778,6 +4928,7 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeTypeParameter1WithExtendsAndBounds() {
super.consumeTypeParameter1WithExtendsAndBounds();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4787,21 +4938,25 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeUnionType() {
pushOnElementStack(K_NEXT_TYPEREF_IS_EXCEPTION);
super.consumeUnionType();
popElement(K_NEXT_TYPEREF_IS_EXCEPTION);
}
+@Override
protected void consumeUnionTypeAsClassType() {
pushOnElementStack(K_NEXT_TYPEREF_IS_EXCEPTION);
super.consumeUnionTypeAsClassType();
popElement(K_NEXT_TYPEREF_IS_EXCEPTION);
}
+@Override
protected void consumeUsesStatement() {
super.consumeUsesStatement();
popElement(K_INSIDE_USES_STATEMENT);
}
+@Override
protected void consumeWildcard() {
super.consumeWildcard();
if (assistIdentifier() == null && this.currentToken == TokenNameIdentifier) { // Test below copied from CompletionScanner.getCurrentIdentifierSource()
@@ -4829,18 +4984,22 @@
this.assistNode = wildcard.bound;
this.lastCheckPoint = wildcard.bound.sourceEnd + 1;
}
+@Override
protected void consumeWildcard1() {
super.consumeWildcard1();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeWildcard2() {
super.consumeWildcard2();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeWildcard3() {
super.consumeWildcard3();
popElement(K_BINARY_OPERATOR);
}
+@Override
protected void consumeWildcardBoundsExtends() {
super.consumeWildcardBoundsExtends();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4850,6 +5009,7 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeWildcardBounds1Extends() {
super.consumeWildcardBounds1Extends();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4859,6 +5019,7 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeWildcardBounds2Extends() {
super.consumeWildcardBounds2Extends();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4868,6 +5029,7 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeWildcardBounds3Extends() {
super.consumeWildcardBounds3Extends();
if (this.assistNode != null && this.assistNodeParent == null) {
@@ -4877,6 +5039,7 @@
}
popElement(K_EXTENDS_KEYWORD);
}
+@Override
protected void consumeUnaryExpression(int op) {
super.consumeUnaryExpression(op);
popElement(K_UNARY_OPERATOR);
@@ -4888,6 +5051,7 @@
}
}
}
+@Override
protected void consumeUnaryExpression(int op, boolean post) {
super.consumeUnaryExpression(op, post);
popElement(K_UNARY_OPERATOR);
@@ -4899,6 +5063,7 @@
}
}
}
+@Override
public MethodDeclaration convertToMethodDeclaration(ConstructorDeclaration c, CompilationResult compilationResult) {
MethodDeclaration methodDeclaration = super.convertToMethodDeclaration(c, compilationResult);
if (this.sourceEnds != null) {
@@ -4908,9 +5073,11 @@
}
return methodDeclaration;
}
+@Override
public ImportReference createAssistPackageVisibilityReference(char[][] tokens, long[] positions){
return new CompletionOnPackageVisibilityReference(tokens, positions);
}
+@Override
public ImportReference createAssistImportReference(char[][] tokens, long[] positions, int mod){
return new CompletionOnImportReference(tokens, positions, mod);
}
@@ -4937,10 +5104,12 @@
return new CompletionOnModuleDeclaration(compilationResult, tokens, positions);
}
//{ObjectTeams: packageModifiers added
+@Override
public ImportReference createAssistPackageReference(char[][] tokens, long[] positions, int packageModifiers){
return new CompletionOnPackageReference(tokens, positions, packageModifiers);
// SH}
}
+@Override
public NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
return new CompletionOnQualifiedNameReference(
previousIdentifiers,
@@ -4956,6 +5125,7 @@
}
return new CompletionOnQualifiedTypeReference(previousIdentifiers, assistName, positions);
}
+@Override
public TypeReference createQualifiedAssistTypeReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
switch (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER)) {
case K_NEXT_TYPEREF_IS_EXCEPTION :
@@ -4985,6 +5155,7 @@
positions);
}
}
+@Override
public TypeReference createParameterizedQualifiedAssistTypeReference(char[][] previousIdentifiers, TypeReference[][] typeArguments, char[] assistName, TypeReference[] assistTypeArguments, long[] positions) {
boolean isParameterized = false;
for (int i = 0; i < typeArguments.length; i++) {
@@ -5028,6 +5199,7 @@
}
}
}
+@Override
public NameReference createSingleAssistNameReference(char[] assistName, long position) {
int kind = topKnownElementKind(COMPLETION_OR_ASSIST_PARSER);
if(!isInsideMethod()) {
@@ -5167,6 +5339,7 @@
}
return new CompletionOnSingleTypeReference(assistName,position);
}
+@Override
public TypeReference createSingleAssistTypeReference(char[] assistName, long position) {
switch (topKnownElementKind(COMPLETION_OR_ASSIST_PARSER)) {
case K_NEXT_TYPEREF_IS_EXCEPTION :
@@ -5181,9 +5354,11 @@
return checkAndCreateModuleSingleAssistTypeReference(assistName, position);
}
}
+@Override
public TypeReference createParameterizedSingleAssistTypeReference(TypeReference[] typeArguments, char[] assistName, long position) {
return createSingleAssistTypeReference(assistName, position);
}
+@Override
protected StringLiteral createStringLiteral(char[] token, int start, int end, int lineNumber) {
if (start <= this.cursorLocation && this.cursorLocation <= end){
char[] source = this.scanner.source;
@@ -5242,6 +5417,7 @@
}
return super.createStringLiteral(token, start, end, lineNumber);
}
+@Override
protected TypeReference augmentTypeWithAdditionalDimensions(TypeReference typeRef, int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
if (this.assistNode == typeRef) {
return typeRef;
@@ -5263,6 +5439,7 @@
/*
* Flush parser/scanner state regarding to code assist
*/
+@Override
public void flushAssistState() {
super.flushAssistState();
@@ -5274,6 +5451,7 @@
completionScanner.completedIdentifierEnd = -1;
}
+@Override
protected TypeReference getTypeReferenceForGenericType(int dim, int identifierLength, int numberOfIdentifiers) {
TypeReference ref = super.getTypeReferenceForGenericType(dim, identifierLength, numberOfIdentifiers);
// in completion case we might have encountered the assist node before really parsing
@@ -5309,6 +5487,7 @@
return ref;
}
+@Override
protected NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
NameReference nameReference = super.getUnspecifiedReference(rejectTypeAnnotations);
if (this.record) {
@@ -5316,6 +5495,7 @@
}
return nameReference;
}
+@Override
protected NameReference getUnspecifiedReferenceOptimized() {
if (this.identifierLengthStack[this.identifierLengthPtr] > 1) { // reducing a qualified name
// potential receiver is being poped, so reset potential receiver
@@ -5333,20 +5513,24 @@
return identifierStart <= this.potentialVariableNameEnds[this.potentialVariableNamesPtr];
}
+@Override
protected int indexOfAssistIdentifier(boolean useGenericsStack) {
if (this.record) return -1; // when names are recorded there is no assist identifier
return super.indexOfAssistIdentifier(useGenericsStack);
}
+@Override
public void initialize() {
super.initialize();
this.labelPtr = -1;
initializeForBlockStatements();
}
+@Override
public void initialize(boolean parsingCompilationUnit) {
super.initialize(parsingCompilationUnit);
this.labelPtr = -1;
initializeForBlockStatements();
}
+@Override
public void copyState(Parser from) {
super.copyState(from);
@@ -5379,6 +5563,7 @@
}
}
}
+@Override
public void initializeScanner(){
this.scanner = new CompletionScanner(this.options.sourceLevel);
//{ObjectTeams: allow to configure OT/J features:
@@ -5493,6 +5678,7 @@
}
return false;
}
+@Override
public ReferenceExpression newReferenceExpression() {
char[] selector = this.identifierStack[this.identifierPtr];
if (selector != assistIdentifier()){
@@ -5510,6 +5696,7 @@
completionScanner.cursorLocation = cursorLoc;
return this.parse(sourceUnit, compilationResult);
}
+@Override
public void parseBlockStatements(
ConstructorDeclaration cd,
CompilationUnitDeclaration unit) {
@@ -5590,6 +5777,7 @@
/*
* Prepares the state of the parser to go for BlockStatements.
*/
+@Override
protected void prepareForBlockStatements() {
this.nestedMethod[this.nestedType = 0] = 1;
this.variablesCounter[this.nestedType] = 0;
@@ -5650,6 +5838,7 @@
addPotentialName(token, nameReference.sourceStart, nameReference.sourceEnd);
}
}
+@Override
public void recoveryExitFromVariable() {
if(this.currentElement != null && this.currentElement instanceof RecoveredLocalVariable) {
RecoveredElement oldElement = this.currentElement;
@@ -5673,6 +5862,7 @@
super.recoveryExitFromVariable();
}
}
+@Override
public void recoveryTokenCheck() {
RecoveredElement oldElement = this.currentElement;
switch (this.currentToken) {
@@ -5728,6 +5918,7 @@
}
}
+@Override
protected CompletionParser createSnapShotParser() {
return new CompletionParser(this.problemReporter, this.storeSourceEnds);
}
@@ -5735,6 +5926,7 @@
* Reset internal state after completion is over
*/
+@Override
public void reset() {
super.reset();
this.cursorLocation = 0;
@@ -5750,6 +5942,7 @@
this.cursorLocation = 0;
flushAssistState();
}
+@Override
public void restoreAssistParser(Object parserState) {
int[] state = (int[]) parserState;
@@ -5776,6 +5969,7 @@
* Move checkpoint location, reset internal stacks and
* decide which grammar goal is activated.
*/
+@Override
protected int resumeAfterRecovery() {
this.hasUnusedModifiers = false;
if (this.assistNode != null) {
@@ -5838,10 +6032,12 @@
}
return super.resumeAfterRecovery();
}
+@Override
public void setAssistIdentifier(char[] assistIdent){
((CompletionScanner)this.scanner).completionIdentifier = assistIdent;
}
+@Override
protected void shouldStackAssistNode() {
this.shouldStackAssistNode = true;
}
@@ -5851,6 +6047,7 @@
return this.shouldStackAssistNode;
}
+@Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("elementKindStack : int[] = {"); //$NON-NLS-1$
@@ -5870,6 +6067,7 @@
/*
* Update recovery state based on current parser/scanner state
*/
+@Override
protected void updateRecoveryState() {
/* expose parser state to recovery state */
@@ -5903,6 +6101,7 @@
recoveryExitFromVariable();
}
+@Override
protected LocalDeclaration createLocalDeclaration(char[] assistName, int sourceStart, int sourceEnd) {
if (this.indexOfAssistIdentifier() < 0) {
return super.createLocalDeclaration(assistName, sourceStart, sourceEnd);
@@ -5914,10 +6113,12 @@
}
}
+@Override
protected JavadocParser createJavadocParser() {
return new CompletionJavadocParser(this);
}
+@Override
protected FieldDeclaration createFieldDeclaration(char[] assistName, int sourceStart, int sourceEnd) {
if (this.indexOfAssistIdentifier() < 0 || (this.currentElement instanceof RecoveredUnit && ((RecoveredUnit)this.currentElement).typeCount == 0)) {
return super.createFieldDeclaration(assistName, sourceStart, sourceEnd);
@@ -5945,6 +6146,7 @@
}
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=292087
+@Override
protected boolean isInsideArrayInitializer(){
int i = this.elementPtr;
if (i > -1 && this.elementKindStack[i] == K_ARRAY_INITIALIZER) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
index d16a7d6..62b5668 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/complete/CompletionScanner.java
@@ -54,6 +54,7 @@
null/*taskPriorities*/,
true/*taskCaseSensitive*/);
}
+@Override
protected boolean isAtAssistIdentifier() {
if (this.cursorLocation < this.startPosition && this.currentPosition == this.startPosition) { // fake empty identifier got issued
return true;
@@ -68,6 +69,7 @@
* on an identifier prefix.
*
*/
+@Override
public char[] getCurrentIdentifierSource() {
if (this.completionIdentifier == null){
@@ -95,6 +97,7 @@
return super.getCurrentIdentifierSource();
}
+@Override
public char[] getCurrentTokenSourceString() {
if (this.completionIdentifier == null){
if (this.cursorLocation+1 >= this.startPosition && this.cursorLocation < this.currentPosition){
@@ -114,6 +117,7 @@
}
return super.getCurrentTokenSourceString();
}
+@Override
protected int getNextToken0() throws InvalidInputException {
//{ObjectTeams: support '.' 'team':
if (this._dotSeen > 0)
@@ -912,6 +916,7 @@
}
return TokenNameEOF;
}
+@Override
public final void getNextUnicodeChar() throws InvalidInputException {
int temp = this.currentPosition; // the \ is already read
super.getNextUnicodeChar();
@@ -922,6 +927,7 @@
throw new InvalidCursorLocation(InvalidCursorLocation.NO_COMPLETION_INSIDE_UNICODE);
}
}
+@Override
protected boolean isFirstTag() {
return
getNextChar('d') &&
@@ -942,6 +948,7 @@
// * In case we actually read a keyword, but the cursor is located inside,
// * we pretend we read an identifier.
// */
+@Override
public int scanIdentifierOrKeyword() {
int id = super.scanIdentifierOrKeyword();
@@ -962,6 +969,7 @@
return id;
}
+@Override
public int scanNumber(boolean dotPrefix) throws InvalidInputException {
int token = super.scanNumber(dotPrefix);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistAnnotation.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistAnnotation.java
index f2d7c4b..7c98846 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistAnnotation.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistAnnotation.java
@@ -25,6 +25,7 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistCompilationUnit.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistCompilationUnit.java
index 6390fbb..115ab6c 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistCompilationUnit.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistCompilationUnit.java
@@ -33,22 +33,27 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
+ @Override
public IImportContainer getImportContainer() {
return new AssistImportContainer(this, this.infoCache);
}
+ @Override
public IPackageDeclaration getPackageDeclaration(String pkg) {
return new AssistPackageDeclaration(this, pkg, this.infoCache);
}
+ @Override
public IType getType(String typeName) {
return new AssistSourceType(this, typeName, this.bindingCache, this.infoCache);
}
+ @Override
public boolean hasChildren() throws JavaModelException {
JavaElementInfo info = (JavaElementInfo)this.infoCache.get(this);
return info.getChildren().length > 0;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportContainer.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportContainer.java
index 47f0469..fa94e2f 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportContainer.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportContainer.java
@@ -26,10 +26,12 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
+ @Override
protected IImportDeclaration getImport(String importName, boolean isOnDemand) {
return new AssistImportDeclaration(this, importName, isOnDemand, this.infoCache);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportDeclaration.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportDeclaration.java
index 1b1aef9..8e020c8 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportDeclaration.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistImportDeclaration.java
@@ -25,6 +25,7 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistInitializer.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistInitializer.java
index 831b139..c440d05 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistInitializer.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistInitializer.java
@@ -28,10 +28,12 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
+ @Override
public IType getType(String typeName, int count) {
AssistSourceType type = new AssistSourceType(this, typeName, this.bindingCache, this.infoCache);
type.occurrenceCount = count;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistPackageDeclaration.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistPackageDeclaration.java
index a3e7cc6..425790f 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistPackageDeclaration.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistPackageDeclaration.java
@@ -26,10 +26,12 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
+ @Override
public IAnnotation getAnnotation(String name) {
return new AssistAnnotation(this, name, this.infoCache);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
index 0d4b87c..85981b2 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
@@ -137,6 +137,7 @@
public abstract char[] assistIdentifier();
+@Override
public void copyState(Parser from) {
super.copyState(from);
@@ -191,6 +192,7 @@
* Build initial recovery state.
* Recovery state is inferred from the current state of the parser (reduced node stack).
*/
+@Override
public RecoveredElement buildInitialRecoveryState(){
/* recovery in unit structure */
if (this.referenceContext instanceof CompilationUnitDeclaration){
@@ -401,30 +403,37 @@
}
}
}
+@Override
protected void consumeAnnotationTypeDeclarationHeader() {
super.consumeAnnotationTypeDeclarationHeader();
pushOnElementStack(K_TYPE_DELIMITER);
}
+@Override
protected void consumeClassBodyDeclaration() {
popElement(K_METHOD_DELIMITER);
super.consumeClassBodyDeclaration();
}
+@Override
protected void consumeClassBodyopt() {
super.consumeClassBodyopt();
popElement(K_SELECTOR);
}
+@Override
protected void consumeClassHeader() {
super.consumeClassHeader();
pushOnElementStack(K_TYPE_DELIMITER);
}
+@Override
protected void consumeConstructorBody() {
super.consumeConstructorBody();
popElement(K_METHOD_DELIMITER);
}
+@Override
protected void consumeConstructorHeader() {
super.consumeConstructorHeader();
pushOnElementStack(K_METHOD_DELIMITER);
}
+@Override
protected void consumeEnhancedForStatementHeaderInit(boolean hasModifiers) {
super.consumeEnhancedForStatementHeaderInit(hasModifiers);
@@ -434,15 +443,18 @@
this.currentElement = this.currentElement.add(localDecl, 0);
}
}
+@Override
protected void consumeEnterAnonymousClassBody(boolean qualified) {
super.consumeEnterAnonymousClassBody(qualified);
popElement(K_SELECTOR);
pushOnElementStack(K_TYPE_DELIMITER);
}
+@Override
protected void consumeEnterMemberValue() {
super.consumeEnterMemberValue();
pushOnElementStack(K_ATTRIBUTE_VALUE_DELIMITER, this.identifierPtr);
}
+@Override
protected void consumeEnumConstantHeader() {
if(this.currentToken == TokenNameLBRACE) {
popElement(K_ENUM_CONSTANT_DELIMITER);
@@ -454,29 +466,35 @@
if (triggerRecoveryUponLambdaClosure((Statement) this.astStack[this.astPtr], true) && this.currentElement != null)
this.restartRecovery = true;
}
+@Override
protected void consumeEnumConstantHeaderName() {
super.consumeEnumConstantHeaderName();
pushOnElementStack(K_ENUM_CONSTANT_DELIMITER);
}
+@Override
protected void consumeEnumConstantWithClassBody() {
popElement(K_TYPE_DELIMITER);
popElement(K_FIELD_INITIALIZER_DELIMITER);
popElement(K_ENUM_CONSTANT_DELIMITER);
super.consumeEnumConstantWithClassBody();
}
+@Override
protected void consumeEnumConstantNoClassBody() {
popElement(K_ENUM_CONSTANT_DELIMITER);
super.consumeEnumConstantNoClassBody();
}
+@Override
protected void consumeEnumHeader() {
super.consumeEnumHeader();
pushOnElementStack(K_TYPE_DELIMITER);
}
+@Override
protected void consumeExitMemberValue() {
super.consumeExitMemberValue();
popElement(K_ATTRIBUTE_VALUE_DELIMITER);
}
+@Override
protected void consumeExplicitConstructorInvocation(int flag, int recFlag) {
super.consumeExplicitConstructorInvocation(flag, recFlag);
popElement(K_SELECTOR);
@@ -610,21 +628,25 @@
}
//{ObjectTeams: make public (was protected)
+@Override
public boolean isAssistParser() {
//SH}
return true;
}
+@Override
protected void consumeBlockStatement() {
super.consumeBlockStatement();
if (triggerRecoveryUponLambdaClosure((Statement) this.astStack[this.astPtr], true) && this.currentElement != null)
this.restartRecovery = true;
}
+@Override
protected void consumeBlockStatements() {
super.consumeBlockStatements();
if (triggerRecoveryUponLambdaClosure((Statement) this.astStack[this.astPtr], true) && this.currentElement != null) {
this.restartRecovery = true;
}
}
+@Override
protected void consumeFieldDeclaration() {
super.consumeFieldDeclaration();
if (triggerRecoveryUponLambdaClosure((Statement) this.astStack[this.astPtr], true)) {
@@ -634,6 +656,7 @@
this.restartRecovery = true;
}
}
+@Override
protected void consumeForceNoDiet() {
super.consumeForceNoDiet();
// if we are not in a method (i.e. we are not in a local variable initializer)
@@ -652,6 +675,7 @@
}
}
+@Override
protected void consumeInterfaceHeader() {
super.consumeInterfaceHeader();
pushOnElementStack(K_TYPE_DELIMITER);
@@ -662,20 +686,24 @@
LambdaExpression lexp = (LambdaExpression) this.astStack[this.astPtr];
pushOnElementStack(K_LAMBDA_EXPRESSION_DELIMITER, EXPRESSION_BODY, lexp);
}
+@Override
protected void consumeMethodBody() {
super.consumeMethodBody();
popElement(K_METHOD_DELIMITER);
}
+@Override
protected void consumeMethodDeclaration(boolean isNotAbstract, boolean isDefaultMethod) {
if (!isNotAbstract) {
popElement(K_METHOD_DELIMITER);
}
super.consumeMethodDeclaration(isNotAbstract, isDefaultMethod);
}
+@Override
protected void consumeMethodHeader() {
super.consumeMethodHeader();
pushOnElementStack(K_METHOD_DELIMITER);
}
+@Override
protected void consumeMethodInvocationName() {
super.consumeMethodInvocationName();
popElement(K_SELECTOR);
@@ -684,6 +712,7 @@
this.lastCheckPoint = messageSend.sourceEnd + 1;
}
}
+@Override
protected void consumeMethodInvocationNameWithTypeArguments() {
super.consumeMethodInvocationNameWithTypeArguments();
popElement(K_SELECTOR);
@@ -692,6 +721,7 @@
this.lastCheckPoint = messageSend.sourceEnd + 1;
}
}
+@Override
protected void consumeMethodInvocationPrimary() {
super.consumeMethodInvocationPrimary();
popElement(K_SELECTOR);
@@ -700,6 +730,7 @@
this.lastCheckPoint = messageSend.sourceEnd + 1;
}
}
+@Override
protected void consumeMethodInvocationPrimaryWithTypeArguments() {
super.consumeMethodInvocationPrimaryWithTypeArguments();
popElement(K_SELECTOR);
@@ -708,6 +739,7 @@
this.lastCheckPoint = messageSend.sourceEnd + 1;
}
}
+@Override
protected void consumeMethodInvocationSuper() {
super.consumeMethodInvocationSuper();
popElement(K_SELECTOR);
@@ -716,6 +748,7 @@
this.lastCheckPoint = messageSend.sourceEnd + 1;
}
}
+@Override
protected void consumeMethodInvocationSuperWithTypeArguments() {
super.consumeMethodInvocationSuperWithTypeArguments();
popElement(K_SELECTOR);
@@ -724,6 +757,7 @@
this.lastCheckPoint = messageSend.sourceEnd + 1;
}
}
+@Override
protected void consumeModuleHeader() {
pushOnElementStack(K_MODULE_INFO_DELIMITER);
// ModuleHeader ::= 'module' Name
@@ -771,14 +805,17 @@
}
}
+@Override
protected void consumeModuleDeclaration() {
super.consumeModuleDeclaration();
popElement(K_MODULE_INFO_DELIMITER);
}
+@Override
protected void consumeNestedMethod() {
super.consumeNestedMethod();
if(!isInsideMethod()) pushOnElementStack(K_METHOD_DELIMITER);
}
+@Override
protected void consumeOpenBlock() {
// OpenBlock ::= $empty
super.consumeOpenBlock();
@@ -821,6 +858,7 @@
}
this.blockStarts[this.realBlockPtr] = -this.scanner.startPosition;
}
+@Override
protected void consumePackageDeclarationName() {
// PackageDeclarationName ::= 'package' Name
/* build an ImportRef build from the last name
@@ -878,6 +916,7 @@
this.restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
+@Override
protected void consumePackageDeclarationNameWithModifiers() {
// PackageDeclarationName ::= Modifiers 'package' PushRealModifiers Name
/* build an ImportRef build from the last name
@@ -942,6 +981,7 @@
this.restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
+@Override
protected void consumeRestoreDiet() {
super.consumeRestoreDiet();
// if we are not in a method (i.e. we were not in a local variable initializer)
@@ -951,6 +991,7 @@
popElement(K_FIELD_INITIALIZER_DELIMITER);
}
}
+@Override
protected void consumeSingleStaticImportDeclarationName() {
// SingleTypeImportDeclarationName ::= 'import' 'static' Name
/* push an ImportRef build from the last name
@@ -1002,6 +1043,7 @@
this.restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
+@Override
protected void consumeSinglePkgName() {
int index;
/* no need to take action if not inside assist identifiers */
@@ -1036,6 +1078,7 @@
reference.declarationSourceEnd = (int) positions[length-1];
}
}
+@Override
protected void consumeSingleTargetModuleName() {
int index;
/* no need to take action if not inside assist identifiers */
@@ -1060,6 +1103,7 @@
}
}
+@Override
protected void consumeSingleRequiresModuleName() {
int index = indexOfAssistIdentifier();
@@ -1100,6 +1144,7 @@
}
+@Override
protected void consumeSingleTypeImportDeclarationName() {
// SingleTypeImportDeclarationName ::= 'import' Name
/* push an ImportRef build from the last name
@@ -1208,6 +1253,7 @@
}
}
// SH}
+@Override
protected void consumeStaticImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
/* push an ImportRef build from the last name
@@ -1262,10 +1308,12 @@
this.restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
+@Override
protected void consumeStaticInitializer() {
super.consumeStaticInitializer();
popElement(K_METHOD_DELIMITER);
}
+@Override
protected void consumeStaticOnly() {
super.consumeStaticOnly();
pushOnElementStack(K_METHOD_DELIMITER);
@@ -1284,6 +1332,7 @@
break;
}
}
+@Override
protected void consumeToken(int token) {
super.consumeToken(token);
@@ -1339,6 +1388,7 @@
this.previousIdentifierPtr = this.identifierPtr;
}
}
+@Override
protected void consumeTypeImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
/* push an ImportRef build from the last name
@@ -1429,10 +1479,12 @@
/*
* Build specific type reference nodes in case the cursor is located inside the type reference
*/
+@Override
protected TypeReference getTypeReference(int dim) {
//{ObjectTeams: wrap to introduce 2nd parameter
return getTypeReference(dim, false);
}
+@Override
protected TypeReference getTypeReference(int dim, boolean liftingTypeAllowed) {
// orig:
@@ -1594,6 +1646,7 @@
* qualified name reference, then create a CompletionOnQualifiedNameReference
* instead.
*/
+@Override
protected NameReference getUnspecifiedReferenceOptimized() {
int completionIndex;
@@ -1635,18 +1688,22 @@
this.lastCheckPoint = reference.sourceEnd + 1;
return reference;
}
+@Override
public void goForBlockStatementsopt() {
super.goForBlockStatementsopt();
this.isFirst = true;
}
+@Override
public void goForHeaders(){
super.goForHeaders();
this.isFirst = true;
}
+@Override
public void goForCompilationUnit(){
super.goForCompilationUnit();
this.isFirst = true;
}
+@Override
public void goForBlockStatementsOrCatchHeader() {
super.goForBlockStatementsOrCatchHeader();
this.isFirst = true;
@@ -1732,6 +1789,7 @@
// none of the awaiting identifiers is the completion one
return -1;
}
+@Override
public void initialize() {
super.initialize();
flushAssistState();
@@ -1739,6 +1797,7 @@
this.previousIdentifierPtr = -1;
this.bracketDepth = 0;
}
+@Override
public void initialize(boolean parsingCompilationUnit) {
super.initialize(parsingCompilationUnit);
flushAssistState();
@@ -1746,6 +1805,7 @@
this.previousIdentifierPtr = -1;
this.bracketDepth = 0;
}
+@Override
public abstract void initializeScanner();
protected boolean isIndirectlyInsideFieldInitialization(){
int i = this.elementPtr;
@@ -1774,6 +1834,7 @@
}
return false;
}
+@Override
protected boolean isIndirectlyInsideLambdaExpression(){
int i = this.elementPtr;
while (i > -1) {
@@ -2211,6 +2272,7 @@
/*
* Prepares the state of the parser to go for BlockStatements.
*/
+@Override
protected void prepareForBlockStatements() {
this.nestedMethod[this.nestedType = 0] = 1;
this.variablesCounter[this.nestedType] = 0;
@@ -2281,6 +2343,7 @@
this.elementInfoStack[this.elementPtr] = info;
this.elementObjectInfoStack[this.elementPtr] = objectInfo;
}
+@Override
public void recoveryExitFromVariable() {
if(this.currentElement != null && this.currentElement instanceof RecoveredField
&& !(this.currentElement instanceof RecoveredInitializer)) {
@@ -2293,6 +2356,7 @@
super.recoveryExitFromVariable();
}
}
+@Override
public void recoveryTokenCheck() {
RecoveredElement oldElement = this.currentElement;
switch (this.currentToken) {
@@ -2415,6 +2479,7 @@
* Move checkpoint location, reset internal stacks and
* decide which grammar goal is activated.
*/
+@Override
protected int resumeAfterRecovery() {
if (requireExtendedRecovery()) {
if (this.unstackedAct == ERROR_ACTION) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceField.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceField.java
index 7d60fa1..4ff9275 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceField.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceField.java
@@ -34,6 +34,7 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
@@ -41,6 +42,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.core.SourceField#getKey()
*/
+ @Override
public String getKey() {
if (this.uniqueKey == null) {
Binding binding = (Binding) this.bindingCache.get(this);
@@ -60,19 +62,23 @@
return this.uniqueKey;
}
+ @Override
public boolean isResolved() {
getKey();
return this.isResolved;
}
+ @Override
protected void toStringInfo(int tab, StringBuffer buffer, Object info,boolean showResolvedInfo) {
super.toStringInfo(tab, buffer, info, showResolvedInfo && isResolved());
}
+ @Override
public IAnnotation getAnnotation(String annotationName) {
return new AssistAnnotation(this, annotationName, this.infoCache);
}
+ @Override
public IType getType(String typeName, int count) {
AssistSourceType type = new AssistSourceType(this, typeName, this.bindingCache, this.infoCache);
type.occurrenceCount = count;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceMethod.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceMethod.java
index c84cbb7..d7c41e4 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceMethod.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceMethod.java
@@ -35,6 +35,7 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
@@ -42,6 +43,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.core.SourceMethod#getKey()
*/
+ @Override
public String getKey() {
if (this.uniqueKey == null) {
Binding binding = (Binding) this.bindingCache.get(this);
@@ -61,25 +63,30 @@
return this.uniqueKey;
}
+ @Override
public boolean isResolved() {
getKey();
return this.isResolved;
}
+ @Override
protected void toStringInfo(int tab, StringBuffer buffer, Object info,boolean showResolvedInfo) {
super.toStringInfo(tab, buffer, info, showResolvedInfo && isResolved());
}
+ @Override
public IAnnotation getAnnotation(String annotationName) {
return new AssistAnnotation(this, annotationName, this.infoCache);
}
+ @Override
public IType getType(String typeName, int count) {
AssistSourceType type = new AssistSourceType(this, typeName, this.bindingCache, this.infoCache);
type.occurrenceCount = count;
return type;
}
+ @Override
public ITypeParameter getTypeParameter(String typeParameterName) {
return new AssistTypeParameter(this, typeParameterName, this.infoCache);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java
index 8c324d9..1b79085 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistSourceType.java
@@ -38,10 +38,12 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
+ @Override
public String getFullyQualifiedParameterizedName() throws JavaModelException {
if (isResolved()) {
return getFullyQualifiedParameterizedName(getFullyQualifiedName('.'), this.getKey());
@@ -52,6 +54,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.core.SourceType#getKey()
*/
+ @Override
public String getKey() {
if (this.uniqueKey == null) {
Binding binding = (Binding) this.bindingCache.get(this);
@@ -71,41 +74,50 @@
return this.uniqueKey;
}
+ @Override
public boolean isResolved() {
getKey();
return this.isResolved;
}
+ @Override
protected void toStringInfo(int tab, StringBuffer buffer, Object info,boolean showResolvedInfo) {
super.toStringInfo(tab, buffer, info, showResolvedInfo && isResolved());
}
+ @Override
public IAnnotation getAnnotation(String annotationName) {
return new AssistAnnotation(this, annotationName, this.infoCache);
}
+ @Override
public IField getField(String fieldName) {
return new AssistSourceField(this, fieldName, this.bindingCache, this.infoCache);
}
+ @Override
public IInitializer getInitializer(int count) {
return new AssistInitializer(this, count, this.bindingCache, this.infoCache);
}
+ @Override
public IMethod getMethod(String selector, String[] parameterTypeSignatures) {
return new AssistSourceMethod(this, selector, parameterTypeSignatures, this.bindingCache, this.infoCache);
}
+ @Override
public IType getType(String typeName) {
return new AssistSourceType(this, typeName, this.bindingCache, this.infoCache);
}
+ @Override
public IType getType(String typeName, int count) {
AssistSourceType type = new AssistSourceType(this, typeName, this.bindingCache, this.infoCache);
type.occurrenceCount = count;
return type;
}
+ @Override
public ITypeParameter getTypeParameter(String typeParameterName) {
return new AssistTypeParameter(this, typeParameterName, this.infoCache);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistTypeParameter.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistTypeParameter.java
index 938a634..5fa122b 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistTypeParameter.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistTypeParameter.java
@@ -25,6 +25,7 @@
this.infoCache = infoCache;
}
+ @Override
public Object getElementInfo(IProgressMonitor monitor) throws JavaModelException {
return this.infoCache.get(this);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java
index 60878b4..f8a1d37 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/Engine.java
@@ -70,6 +70,7 @@
/**
* Add an additional binary type
*/
+ @Override
public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
this.lookupEnvironment.createBinaryTypeFrom(binaryType, packageBinding, accessRestriction);
}
@@ -77,6 +78,7 @@
/**
* Add an additional compilation unit.
*/
+ @Override
public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) {
CompilationResult result = new CompilationResult(sourceUnit, 1, 1, this.compilerOptions.maxProblemsPerUnit);
@@ -96,6 +98,7 @@
* Add additional source types (the first one is the requested type, the rest is formed by the
* secondary types defined in the same compilation unit).
*/
+ @Override
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) {
//{ObjectTeams:
LookupEnvironment environment = packageBinding.environment;
@@ -522,6 +525,7 @@
}
//{ObjectTeams: new function in ITypeRequester for use by Config:
+ @Override
public Parser getPlainParser() {
return null;
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadoc.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadoc.java
index 211bc1a..22853a5 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadoc.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadoc.java
@@ -32,6 +32,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.Javadoc#print(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
super.print(indent, output);
if (this.selectedNode != null) {
@@ -127,6 +128,7 @@
*
* @throws SelectionNodeFound
*/
+ @Override
public void resolve(ClassScope scope) {
internalResolve(scope);
}
@@ -137,6 +139,7 @@
*
* @throws SelectionNodeFound
*/
+ @Override
public void resolve(MethodScope scope) {
internalResolve(scope);
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java
index 7c8fb62..bec08fd 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionJavadocParser.java
@@ -39,6 +39,7 @@
/*
* Do not parse comment if selection is not included.
*/
+ @Override
public boolean checkDeprecation(int commentPtr) {
this.selectionStart = ((SelectionParser)this.sourceParser).selectionStart;
this.selectionEnd = ((SelectionParser)this.sourceParser).selectionEnd;
@@ -58,6 +59,7 @@
/*
* Replace stored Javadoc node with specific selection one.
*/
+ @Override
protected boolean commentParse() {
this.docComment = new SelectionJavadoc(this.javadocStart, this.javadocEnd);
return super.commentParse();
@@ -66,6 +68,7 @@
/*
* Create argument expression and store it if it includes selection.
*/
+ @Override
protected Object createArgumentReference(char[] name, int dim, boolean isVarargs, Object typeRef, long[] dimPositions, long argNamePos) throws InvalidInputException {
// Create argument as we may need it after
Expression expression = (Expression) super.createArgumentReference(name, dim, isVarargs, typeRef, dimPositions, argNamePos);
@@ -87,6 +90,7 @@
* If so, create field reference, store it and abort comment parse.
* Otherwise return null as we do not need this reference.
*/
+ @Override
protected Object createFieldReference(Object receiver) throws InvalidInputException {
int start = (int) (this.identifierPositionStack[0] >>> 32);
int end = (int) this.identifierPositionStack[0];
@@ -105,6 +109,7 @@
* If so, create field reference, store it and abort comment parse.
* Otherwise return null as we do not need this reference.
*/
+ @Override
protected Object createMethodReference(Object receiver, List arguments) throws InvalidInputException {
int memberPtr = this.identifierLengthStack[0] - 1; // may be > 0 for inner class constructor reference
int start = (int) (this.identifierPositionStack[memberPtr] >>> 32);
@@ -124,6 +129,7 @@
* If so, store it and abort comment parse.
* Otherwise return null as we do not need this reference.
*/
+ @Override
protected Object createTypeReference(int primitiveToken) {
// Need to create type ref in case it was needed by members
TypeReference typeRef = (TypeReference) super.createTypeReference(primitiveToken);
@@ -168,6 +174,7 @@
* Push param reference and verify if it includes selection.
* If so, store it and abort comment parse.
*/
+ @Override
protected boolean pushParamName(boolean isTypeParam) {
if (super.pushParamName(isTypeParam)) {
Expression expression = (Expression) this.astStack[this.astPtr--];
@@ -186,6 +193,7 @@
/*
* Store selected node into doc comment.
*/
+ @Override
protected void updateDocComment() {
if (this.selectedNode instanceof Expression) {
((SelectionJavadoc) this.docComment).selectedNode = (Expression) this.selectedNode;
@@ -197,6 +205,7 @@
/*
* Sets a flag to denote that selection has taken place on an inheritDoc tag
*/
+ @Override
protected void parseInheritDocTag() {
if (this.tagSourceStart == this.selectionStart && this.tagSourceEnd == this.selectionEnd)
this.inheritDocTagSelected = true;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java
index 060585d..6a5afd3 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnArgumentName.java
@@ -28,12 +28,14 @@
public SelectionOnArgumentName(char[] name , long posNom , TypeReference tr , int modifiers, boolean typeElided){
super(name, posNom, tr, modifiers, typeElided);
}
+ @Override
public TypeBinding bind(MethodScope scope, TypeBinding typeBinding, boolean used) {
super.bind(scope, typeBinding, used);
throw new SelectionNodeFound(this.binding);
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
@@ -47,12 +49,14 @@
return output.append('>');
}
+ @Override
public void resolve(BlockScope scope) {
super.resolve(scope);
throw new SelectionNodeFound(this.binding);
}
+ @Override
public TypeBinding resolveForCatch(BlockScope scope) {
super.resolveForCatch(scope);
throw new SelectionNodeFound(this.binding);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java
index 54cb427..fd5803e 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnExplicitConstructorCall.java
@@ -49,6 +49,7 @@
super(accessMode);
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output);
@@ -74,6 +75,7 @@
return output.append(")>;"); //$NON-NLS-1$
}
+ @Override
public void resolve(BlockScope scope) {
super.resolve(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldReference.java
index 326d28f..6e4548d 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldReference.java
@@ -46,12 +46,14 @@
super(source, pos);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
output.append("<SelectionOnFieldReference:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldType.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldType.java
index a4838b0..0e26de0 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldType.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnFieldType.java
@@ -22,6 +22,7 @@
this.type = type;
this.name = CharOperation.NO_CHAR;
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
return this.type.print(tab, output).append(';');
}
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnImportReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnImportReference.java
index 10dcce3..8829332 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnImportReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnImportReference.java
@@ -36,6 +36,7 @@
public SelectionOnImportReference(char[][] tokens , long[] positions, int modifiers) {
super(tokens, positions, false, modifiers);
}
+@Override
public StringBuffer print(int indent, StringBuffer output, boolean withOnDemand) {
printIndent(indent, output).append("<SelectOnImport:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnLocalName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnLocalName.java
index fbf92c4..79ec1e3 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnLocalName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnLocalName.java
@@ -20,12 +20,14 @@
super(name, sourceStart, sourceEnd);
}
+ @Override
public void resolve(BlockScope scope) {
super.resolve(scope);
throw new SelectionNodeFound(this.binding);
}
+ @Override
public StringBuffer printAsExpression(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("<SelectionOnLocalName:"); //$NON-NLS-1$
@@ -38,6 +40,7 @@
return output.append('>');
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printAsExpression(indent, output);
return output.append(';');
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java
index b467c95..0f5d832 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnMessageSend.java
@@ -79,6 +79,7 @@
return methodBinding;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectOnMessageSend:"); //$NON-NLS-1$
@@ -93,6 +94,7 @@
return output.append(")>"); //$NON-NLS-1$
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
TypeBinding type = super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnModuleReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnModuleReference.java
index 500f7c7..e394f6f 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnModuleReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnModuleReference.java
@@ -21,6 +21,7 @@
super(tokens, sourcePositions);
}
+ @Override
public ModuleBinding resolve(Scope scope) {
ModuleBinding resolvedBinding = super.resolve(scope);
if (resolvedBinding != null) {
@@ -30,6 +31,7 @@
}
}
+ @Override
public StringBuffer print(int tab, StringBuffer output) {
printIndent(tab, output).append("<SelectOnModuleReference:"); //$NON-NLS-1$
for (int i = 0; i < this.tokens.length; i++) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnNameOfMemberValuePair.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnNameOfMemberValuePair.java
index b703dc3..4e7cd64 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnNameOfMemberValuePair.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnNameOfMemberValuePair.java
@@ -22,6 +22,7 @@
super(token, sourceStart, sourceEnd, value);
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
output.append("<SelectOnName:"); //$NON-NLS-1$
output.append(this.name);
@@ -29,6 +30,7 @@
return output;
}
+ @Override
public void resolveTypeExpecting(BlockScope scope, TypeBinding requiredType) {
super.resolveTypeExpecting(scope, requiredType);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageReference.java
index 2ad2d3b..9b9f9b7 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageReference.java
@@ -44,6 +44,7 @@
super(tokens, positions, false, modifiers);
// SH}
}
+@Override
public StringBuffer print(int tab, StringBuffer output, boolean withOnDemand) {
printIndent(tab, output).append("<SelectOnPackage:"); //$NON-NLS-1$
for (int i = 0; i < this.tokens.length; i++) {
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageVisibilityReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageVisibilityReference.java
index a452b13..8c33e95 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageVisibilityReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnPackageVisibilityReference.java
@@ -34,6 +34,7 @@
super(tokens, positions, false, 0);
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output).append("<SelectOnPackageVisibility:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java
index ffe9b99..ffa416f 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedQualifiedTypeReference.java
@@ -31,6 +31,7 @@
this.typeArguments[length] = assistTypeArguments;
}
+ @Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
super.resolveType(scope, checkBounds, location);
//// removed unnecessary code to solve bug 94653
@@ -41,6 +42,7 @@
throw new SelectionNodeFound(this.resolvedType);
}
+ @Override
public TypeBinding resolveType(ClassScope scope, int location) {
super.resolveType(scope, location);
//// removed unnecessary code to solve bug 94653
@@ -51,6 +53,7 @@
throw new SelectionNodeFound(this.resolvedType);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectOnType:");//$NON-NLS-1$
int length = this.tokens.length;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java
index e3fc048..024d6a4 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnParameterizedSingleTypeReference.java
@@ -25,11 +25,13 @@
super(name, typeArguments, 0, pos);
}
+ @Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
super.resolveType(scope, checkBounds, location);
throw new SelectionNodeFound(this.resolvedType);
}
+ @Override
public TypeBinding resolveType(ClassScope scope, int location) {
super.resolveType(scope, location);
throw new SelectionNodeFound(this.resolvedType);
@@ -44,6 +46,7 @@
}
// SH}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
output.append("<SelectOnType:");//$NON-NLS-1$
output.append(this.token);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedAllocationExpression.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedAllocationExpression.java
index 356be94..bc4dd09 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedAllocationExpression.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedAllocationExpression.java
@@ -50,6 +50,7 @@
super(anonymous);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
if (this.enclosingInstance == null)
output.append("<SelectOnAllocationExpression:"); //$NON-NLS-1$
@@ -59,6 +60,7 @@
return super.printExpression(indent, output).append('>');
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedNameReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedNameReference.java
index 931710f..76cb007 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedNameReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedNameReference.java
@@ -50,6 +50,7 @@
(int) (positions[0] >>> 32),
(int) positions[positions.length - 1]);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectOnName:"); //$NON-NLS-1$
@@ -59,6 +60,7 @@
}
return output.append('>');
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// it can be a package, type, member type, local variable or field
this.binding = scope.getBinding(this.tokens, this);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedSuperReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedSuperReference.java
index e2277ec..145242c 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedSuperReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedSuperReference.java
@@ -42,12 +42,14 @@
public SelectionOnQualifiedSuperReference(TypeReference name, int pos, int sourceEnd) {
super(name, pos, sourceEnd);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectOnQualifiedSuper:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
TypeBinding binding = super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedTypeReference.java
index 2382660..4f565b4 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnQualifiedTypeReference.java
@@ -40,9 +40,11 @@
CharOperation.arrayConcat(previousIdentifiers, selectionIdentifier),
positions);
}
+@Override
public void aboutToResolve(Scope scope) {
getTypeBinding(scope.parent); // step up from the ClassScope
}
+@Override
protected TypeBinding getTypeBinding(Scope scope) {
// it can be a package, type or member type
Binding binding = scope.getTypeOrPackage(this.tokens);
@@ -69,6 +71,7 @@
throw new SelectionNodeFound(binding);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectOnType:"); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnReferenceExpressionName.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnReferenceExpressionName.java
index 5b2f800..49f1a28 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnReferenceExpressionName.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnReferenceExpressionName.java
@@ -25,6 +25,7 @@
super(scanner);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectionOnReferenceExpressionName:"); //$NON-NLS-1$
super.printExpression(indent, output);
@@ -32,15 +33,18 @@
}
// See SelectionScanner#scanIdentifierOrKeyword
+ @Override
public boolean isConstructorReference() {
return CharOperation.equals(this.selector, "new".toCharArray()); //$NON-NLS-1$
}
// See SelectionScanner#scanIdentifierOrKeyword
+ @Override
public boolean isMethodReference() {
return !CharOperation.equals(this.selector, "new".toCharArray()); //$NON-NLS-1$
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
TypeBinding type = super.resolveType(scope);
if (type == null || type instanceof ProblemReferenceBinding || type instanceof PolyTypeBinding)
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleNameReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleNameReference.java
index b0dac7b..e405922 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleNameReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleNameReference.java
@@ -49,6 +49,7 @@
public SelectionOnSingleNameReference(char[] source, long pos) {
super(source, pos);
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
if (this.actualReceiverType != null) {
this.binding = scope.getField(this.actualReceiverType, this.token, this);
@@ -101,6 +102,7 @@
throw new SelectionNodeFound(this.binding); // other anchors have a real field
}
// SH}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectOnName:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleTypeReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleTypeReference.java
index 6e9c36e..0fde10c 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleTypeReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSingleTypeReference.java
@@ -39,9 +39,11 @@
public SelectionOnSingleTypeReference(char[] source, long pos) {
super(source, pos);
}
+@Override
public void aboutToResolve(Scope scope) {
getTypeBinding(scope.parent); // step up from the ClassScope
}
+@Override
protected TypeBinding getTypeBinding(Scope scope) {
//{ObjectTeams: re-use binding if already found a valid one:
// (lookup may happen using different scopes,
@@ -70,10 +72,12 @@
}
throw new SelectionNodeFound(binding);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return output.append("<SelectOnType:").append(this.token).append('>');//$NON-NLS-1$
}
+@Override
public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
super.resolveTypeEnclosing(scope, enclosingType);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSuperReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSuperReference.java
index 17a1aec..b66d441 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSuperReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionOnSuperReference.java
@@ -42,11 +42,13 @@
public SelectionOnSuperReference(int pos, int sourceEnd) {
super(pos, sourceEnd);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output){
output.append("<SelectOnSuper:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
TypeBinding binding = super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
index 7126c32..7ac3660 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionParser.java
@@ -84,6 +84,7 @@
super(problemReporter);
this.javadocParser.checkDocComment = true;
}
+@Override
public char[] assistIdentifier(){
return ((SelectionScanner)this.scanner).selectionIdentifier;
}
@@ -211,6 +212,7 @@
}
return false;
}
+@Override
protected void classInstanceCreation(boolean hasClassBody) {
// ClassInstanceCreationExpression ::= 'new' ClassType '(' ArgumentListopt ')' ClassBodyopt
@@ -272,6 +274,7 @@
super.classInstanceCreation(hasClassBody);
}
}
+@Override
protected void consumeArrayCreationExpressionWithoutInitializer() {
// ArrayCreationWithoutArrayInitializer ::= 'new' PrimitiveType DimWithOrWithOutExprs
// ArrayCreationWithoutArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs
@@ -287,6 +290,7 @@
this.isOrphanCompletionNode = true;
}
}
+@Override
protected void consumeArrayCreationExpressionWithInitializer() {
// ArrayCreationWithArrayInitializer ::= 'new' ClassOrInterfaceType DimWithOrWithOutExprs ArrayInitializer
@@ -301,30 +305,37 @@
this.isOrphanCompletionNode = true;
}
}
+@Override
protected void consumeCastExpressionLL1() {
popElement(K_CAST_STATEMENT);
super.consumeCastExpressionLL1();
}
+@Override
protected void consumeCastExpressionLL1WithBounds() {
popElement(K_CAST_STATEMENT);
super.consumeCastExpressionLL1WithBounds();
}
+@Override
protected void consumeCastExpressionWithGenericsArray() {
popElement(K_CAST_STATEMENT);
super.consumeCastExpressionWithGenericsArray();
}
+@Override
protected void consumeCastExpressionWithNameArray() {
popElement(K_CAST_STATEMENT);
super.consumeCastExpressionWithNameArray();
}
+@Override
protected void consumeCastExpressionWithPrimitiveType() {
popElement(K_CAST_STATEMENT);
super.consumeCastExpressionWithPrimitiveType();
}
+@Override
protected void consumeCastExpressionWithQualifiedGenericsArray() {
popElement(K_CAST_STATEMENT);
super.consumeCastExpressionWithQualifiedGenericsArray();
}
+@Override
protected void consumeCatchFormalParameter() {
if (this.indexOfAssistIdentifier() < 0) {
super.consumeCatchFormalParameter();
@@ -386,6 +397,7 @@
this.listLength++;
}
}
+@Override
protected void consumeClassInstanceCreationExpressionQualifiedWithTypeArguments() {
// ClassInstanceCreationExpression ::= Primary '.' 'new' TypeArguments SimpleName '(' ArgumentListopt ')' ClassBodyopt
// ClassInstanceCreationExpression ::= ClassInstanceCreationExpressionName 'new' TypeArguments SimpleName '(' ArgumentListopt ')' ClassBodyopt
@@ -451,6 +463,7 @@
this.expressionStack[this.expressionPtr] = qae;
qae.sourceStart = qae.enclosingInstance.sourceStart;
}
+@Override
protected void consumeClassInstanceCreationExpressionWithTypeArguments() {
// ClassInstanceCreationExpression ::= 'new' TypeArguments ClassType '(' ArgumentListopt ')' ClassBodyopt
AllocationExpression alloc;
@@ -508,6 +521,7 @@
super.consumeClassInstanceCreationExpressionWithTypeArguments();
}
}
+@Override
protected void consumeEnterAnonymousClassBody(boolean qualified) {
// EnterAnonymousClassBody ::= $empty
@@ -579,6 +593,7 @@
this.lastIgnoredToken = -1;
}
}
+@Override
protected void consumeEnterVariable() {
// EnterVariable ::= $empty
// do nothing by default
@@ -595,6 +610,7 @@
}
}
+@Override
protected void consumeExitVariableWithInitialization() {
super.consumeExitVariableWithInitialization();
@@ -609,6 +625,7 @@
triggerRecoveryUponLambdaClosure(variable, false);
}
+@Override
protected void consumeFieldAccess(boolean isSuperAccess) {
// FieldAccess ::= Primary '.' 'Identifier'
// FieldAccess ::= 'super' '.' 'Identifier'
@@ -640,6 +657,7 @@
}
this.isOrphanCompletionNode = true;
}
+@Override
protected void consumeFormalParameter(boolean isVarArgs) {
if (this.indexOfAssistIdentifier() < 0) {
super.consumeFormalParameter(isVarArgs);
@@ -747,22 +765,27 @@
return false;
}
// SH}
+@Override
protected void consumeInsideCastExpression() {
super.consumeInsideCastExpression();
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInsideCastExpressionLL1() {
super.consumeInsideCastExpressionLL1();
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInsideCastExpressionLL1WithBounds() {
super.consumeInsideCastExpressionLL1WithBounds();
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInsideCastExpressionWithQualifiedGenerics() {
super.consumeInsideCastExpressionWithQualifiedGenerics();
pushOnElementStack(K_CAST_STATEMENT);
}
+@Override
protected void consumeInstanceOfExpression() {
if (indexOfAssistIdentifier() < 0) {
super.consumeInstanceOfExpression();
@@ -773,6 +796,7 @@
this.lastIgnoredToken = -1;
}
}
+@Override
protected void consumeInstanceOfExpressionWithName() {
if (indexOfAssistIdentifier() < 0) {
super.consumeInstanceOfExpressionWithName();
@@ -810,6 +834,7 @@
super.consumeReferenceExpression(referenceExpression);
}
+@Override
protected void consumeLocalVariableDeclarationStatement() {
super.consumeLocalVariableDeclarationStatement();
@@ -826,18 +851,21 @@
this.restartRecovery = true;
}
}
+@Override
protected void consumeAssignment() {
super.consumeAssignment();
if (this.selectionNodeFound) {
this.restartRecovery = true;
}
}
+@Override
protected void consumeBlockStatement() {
super.consumeBlockStatement();
if (this.selectionNodeFound) {
this.restartRecovery = true;
}
}
+@Override
protected void consumeMarkerAnnotation(boolean isTypeAnnotation) {
int index;
@@ -889,6 +917,7 @@
pushOnExpressionStack(markerAnnotation);
}
}
+@Override
protected void consumeMemberValuePair() {
if (this.indexOfAssistIdentifier() < 0) {
super.consumeMemberValuePair();
@@ -910,6 +939,7 @@
}
+@Override
protected void consumeMethodInvocationName() {
// MethodInvocation ::= Name '(' ArgumentListopt ')'
@@ -967,10 +997,12 @@
this.lastIgnoredToken = -1;
} else {
pushOnExpressionStack(new Expression(){
+ @Override
public TypeBinding resolveType(BlockScope scope) {
constructorCall.resolve(scope);
return null;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return output;
}
@@ -980,6 +1012,7 @@
this.lastCheckPoint = constructorCall.sourceEnd + 1;
this.isOrphanCompletionNode = true;
}
+@Override
protected void consumeMethodInvocationPrimary() {
//optimize the push/pop
//MethodInvocation ::= Primary '.' 'Identifier' '(' ArgumentListopt ')'
@@ -1025,10 +1058,12 @@
this.lastIgnoredToken = -1;
} else {
pushOnExpressionStack(new Expression(){
+ @Override
public TypeBinding resolveType(BlockScope scope) {
constructorCall.resolve(scope);
return null;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return output;
}
@@ -1039,6 +1074,7 @@
this.lastCheckPoint = constructorCall.sourceEnd + 1;
this.isOrphanCompletionNode = true;
}
+@Override
protected void consumeNormalAnnotation(boolean isTypeAnnotation) {
int index;
@@ -1098,6 +1134,7 @@
pushOnExpressionStack(normalAnnotation);
}
}
+@Override
protected void consumeSingleMemberAnnotation(boolean isTypeAnnotation) {
int index;
@@ -1151,6 +1188,7 @@
pushOnExpressionStack(singleMemberAnnotation);
}
}
+@Override
protected void consumeStaticImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' 'static' Name '.' '*'
/* push an ImportRef build from the last name
@@ -1205,6 +1243,7 @@
this.restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
+@Override
protected void consumeToken(int token) {
super.consumeToken(token);
@@ -1234,6 +1273,7 @@
}
}
}
+@Override
protected void consumeTypeImportOnDemandDeclarationName() {
// TypeImportOnDemandDeclarationName ::= 'import' Name '.' '*'
/* push an ImportRef build from the last name
@@ -1288,12 +1328,15 @@
this.restartRecovery = true; // used to avoid branching back into the regular automaton
}
}
+@Override
protected SelectionParser createSnapShotParser() {
return new SelectionParser(this.problemReporter);
}
+@Override
public ImportReference createAssistPackageVisibilityReference(char[][] tokens, long[] positions){
return new SelectionOnPackageVisibilityReference(tokens, positions);
}
+@Override
public ImportReference createAssistImportReference(char[][] tokens, long[] positions, int mod){
return new SelectionOnImportReference(tokens, positions, mod);
}
@@ -1303,13 +1346,16 @@
return new SelectionOnModuleDeclaration(compilationResult, tokens, positions);
}
//{ObjectTeams: modifiers added:
+@Override
public ImportReference createAssistPackageReference(char[][] tokens, long[] positions, int modifiers){
return new SelectionOnPackageReference(tokens, positions, modifiers);
// SH}
}
+@Override
protected JavadocParser createJavadocParser() {
return new SelectionJavadocParser(this);
}
+@Override
protected LocalDeclaration createLocalDeclaration(char[] assistName,int sourceStart,int sourceEnd) {
if (this.indexOfAssistIdentifier() < 0) {
return super.createLocalDeclaration(assistName, sourceStart, sourceEnd);
@@ -1320,29 +1366,35 @@
return local;
}
}
+@Override
public NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
return new SelectionOnQualifiedNameReference(
previousIdentifiers,
assistName,
positions);
}
+@Override
public TypeReference createQualifiedAssistTypeReference(char[][] previousIdentifiers, char[] assistName, long[] positions){
return new SelectionOnQualifiedTypeReference(
previousIdentifiers,
assistName,
positions);
}
+@Override
public TypeReference createParameterizedQualifiedAssistTypeReference(
char[][] tokens, TypeReference[][] typeArguments, char[] assistname, TypeReference[] assistTypeArguments, long[] positions) {
return new SelectionOnParameterizedQualifiedTypeReference(tokens, assistname, typeArguments, assistTypeArguments, positions);
}
+@Override
public NameReference createSingleAssistNameReference(char[] assistName, long position) {
return new SelectionOnSingleNameReference(assistName, position);
}
+@Override
public TypeReference createSingleAssistTypeReference(char[] assistName, long position) {
return new SelectionOnSingleTypeReference(assistName, position);
}
+@Override
public TypeReference createParameterizedSingleAssistTypeReference(TypeReference[] typeArguments, char[] assistName, long position) {
return new SelectionOnParameterizedSingleTypeReference(assistName, typeArguments, position);
}
@@ -1356,6 +1408,7 @@
selectionScanner.selectionEnd = end;
return this.dietParse(sourceUnit, compilationResult);
}
+@Override
protected NameReference getUnspecifiedReference(boolean rejectTypeAnnotations) {
/* build a (unspecified) NameReference which may be qualified*/
@@ -1485,6 +1538,7 @@
* qualified name reference, then create a CompletionOnQualifiedNameReference
* instead.
*/
+@Override
protected NameReference getUnspecifiedReferenceOptimized() {
int index = indexOfAssistIdentifier();
@@ -1513,12 +1567,14 @@
return identifier;
}
// SH}
+@Override
public void initializeScanner(){
this.scanner = new SelectionScanner(this.options.sourceLevel);
//{ObjectTeams: allow to configure OT/J features:
this.scanner.setOTFlags(this.options);
// SH}
}
+@Override
public ReferenceExpression newReferenceExpression() {
char[] selector = this.identifierStack[this.identifierPtr];
if (selector != assistIdentifier()){
@@ -1528,6 +1584,7 @@
this.assistNode = referenceExpression;
return referenceExpression;
}
+@Override
protected MessageSend newMessageSend() {
// '(' ArgumentListopt ')'
// the arguments are on the expression stack
@@ -1559,6 +1616,7 @@
return messageSend;
}
//{ObjectTeams: just ike the above but for tsuper.m(args)
+@Override
protected TSuperMessageSend newTSuperMessageSend() {
// '(' ArgumentListopt ')'
// the arguments are on the expression stack
@@ -1590,6 +1648,7 @@
return messageSend;
}
// SH}
+@Override
protected MessageSend newMessageSendWithTypeArguments() {
char[] selector = this.identifierStack[this.identifierPtr];
if (selector != assistIdentifier()){
@@ -1615,6 +1674,7 @@
this.isOrphanCompletionNode = true;
return messageSend;
}
+@Override
public CompilationUnitDeclaration parse(ICompilationUnit sourceUnit, CompilationResult compilationResult, int start, int end) {
if (end == -1) return super.parse(sourceUnit, compilationResult, start, end);
@@ -1635,6 +1695,7 @@
* Move checkpoint location, reset internal stacks and
* decide which grammar goal is activated.
*/
+@Override
protected int resumeAfterRecovery() {
/* if reached assist node inside method body, but still inside nested type,
@@ -1667,12 +1728,14 @@
public void selectionIdentifierCheck(){
if (checkRecoveredType()) return;
}
+@Override
public void setAssistIdentifier(char[] assistIdent){
((SelectionScanner)this.scanner).selectionIdentifier = assistIdent;
}
/*
* Update recovery state based on current parser/scanner state
*/
+@Override
protected void updateRecoveryState() {
/* expose parser state to recovery state */
@@ -1694,6 +1757,7 @@
*/
recoveryTokenCheck();
}
+@Override
protected Argument typeElidedArgument() {
char[] selector = this.identifierStack[this.identifierPtr];
if (selector != assistIdentifier()){
@@ -1730,6 +1794,7 @@
}
/* create specialized node */
+ @Override
protected MethodSpec convertToMethodSpec(AbstractMethodDeclaration methodDeclaration) {
/* no need to take action if not inside assist identifiers */
if (indexOfAssistIdentifier() < 0)
@@ -1739,6 +1804,7 @@
return spec;
}
/* create specialized node */
+ @Override
protected MethodSpec newMethodSpec(char[] ident, long pos) {
/* no need to take action if not inside assist identifiers */
if (indexOfAssistIdentifier() < 0)
@@ -1759,6 +1825,7 @@
return spec;
}
/* create specialized node */
+ @Override
protected BaseCallMessageSend convertToBaseCallMessageSend(MessageSend send, int baseEndPosition) {
if (indexOfAssistIdentifier() < 0)
return super.convertToBaseCallMessageSend(send, baseEndPosition);
@@ -1814,6 +1881,7 @@
}
//haebor}
+@Override
public String toString() {
String s = Util.EMPTY_STRING;
s = s + "elementKindStack : int[] = {"; //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionScanner.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionScanner.java
index ba77b36..d52fc28 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionScanner.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/select/SelectionScanner.java
@@ -34,10 +34,12 @@
super(false /*comment*/, false /*whitespace*/, false /*nls*/, sourceLevel, null /*taskTags*/, null/*taskPriorities*/, true/*taskCaseSensitive*/);
}
+@Override
protected boolean isAtAssistIdentifier() {
return this.selectionStart == this.startPosition && this.selectionEnd == this.currentPosition - 1;
}
+@Override
public char[] getCurrentIdentifierSource() {
if (this.selectionIdentifier == null){
@@ -58,6 +60,7 @@
* In case we actually read a keyword which corresponds to the selected
* range, we pretend we read an identifier.
*/
+@Override
public int scanIdentifierOrKeyword() {
int id = super.scanIdentifierOrKeyword();
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseCallMessageSend.java b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseCallMessageSend.java
index da7efe2..ec6ddda 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseCallMessageSend.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseCallMessageSend.java
@@ -53,6 +53,7 @@
super(wrappee, baseEndPosition);
}
+ @Override
public TypeBinding resolveType(BlockScope scope)
{
try {
@@ -160,7 +161,8 @@
return foundMappings;
}
- public StringBuffer printExpression(int indent, StringBuffer output)
+ @Override
+ public StringBuffer printExpression(int indent, StringBuffer output)
{
MessageSend wrappee = (MessageSend) this._wrappee;
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseReference.java
index 3a5a1fa..a857904 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnBaseReference.java
@@ -59,13 +59,15 @@
super(pos, sourceEnd);
}
- public StringBuffer printExpression(int indent, StringBuffer output)
+ @Override
+ public StringBuffer printExpression(int indent, StringBuffer output)
{
output.append("<SelectOnBase:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
}
- public TypeBinding resolveType(BlockScope scope)
+ @Override
+ public TypeBinding resolveType(BlockScope scope)
{
ReferenceBinding binding = (ReferenceBinding) super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnParameterMapping.java b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnParameterMapping.java
index c4e83fd..69494f8 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnParameterMapping.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnParameterMapping.java
@@ -33,6 +33,7 @@
if (this.ident.binding != null)
throw new SelectionNodeFound(this.ident.binding);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("<SelectOnParameterMapping:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnTSuperReference.java b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnTSuperReference.java
index c61b8ca..433a110 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnTSuperReference.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/objectteams/otdt/internal/codeassist/SelectionOnTSuperReference.java
@@ -58,14 +58,16 @@
super(pos, sourceEnd);
}
- public StringBuffer printExpression(int indent, StringBuffer output)
+ @Override
+ public StringBuffer printExpression(int indent, StringBuffer output)
{
output.append("<SelectOnTSuper:"); //$NON-NLS-1$
return super.printExpression(0, output).append('>');
}
- public TypeBinding resolveType(BlockScope scope)
+ @Override
+ public TypeBinding resolveType(BlockScope scope)
{
TypeBinding tSuperRole = super.resolveType(scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java
index 843cb75..96dc55b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/CategorizedProblem.java
@@ -162,6 +162,7 @@
*
* @since 3.12
*/
+@Override
public boolean isInfo() {
return false;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
index 65aaa2c..f765e0e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ClassFile.java
@@ -478,6 +478,7 @@
ReferenceBinding[] innerClasses = new ReferenceBinding[numberOfInnerClasses];
this.innerClassesBindings.keySet().toArray(innerClasses);
Arrays.sort(innerClasses, new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
TypeBinding binding1 = (TypeBinding) o1;
TypeBinding binding2 = (TypeBinding) o2;
@@ -4056,6 +4057,7 @@
int numberOfMissingTypes = 0;
if (initialSize > 1) {
Collections.sort(this.missingTypes, new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
TypeBinding typeBinding1 = (TypeBinding) o1;
TypeBinding typeBinding2 = (TypeBinding) o2;
@@ -5899,6 +5901,7 @@
}
}
Collections.sort(result, new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
StackMapFrame frame = (StackMapFrame) o1;
StackMapFrame frame2 = (StackMapFrame) o2;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
index 96ddb37..326eec0 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/CompilationResult.java
@@ -141,6 +141,7 @@
private static final int[] EMPTY_LINE_ENDS = Util.EMPTY_INT_ARRAY;
private static final Comparator PROBLEM_COMPARATOR = new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
return ((CategorizedProblem) o1).getSourceStart() - ((CategorizedProblem) o2).getSourceStart();
}
@@ -556,6 +557,7 @@
}
// SH}
+@Override
public String toString(){
StringBuffer buffer = new StringBuffer();
if (this.fileName != null){
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
index 618078e..6ed69ba 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/Compiler.java
@@ -312,6 +312,7 @@
this.requestor = requestor;
} else {
this.requestor = new ICompilerRequestor(){
+ @Override
public void acceptResult(CompilationResult result){
if (DebugRequestor.isActive()){
DebugRequestor.acceptDebugResult(result);
@@ -335,6 +336,7 @@
/**
* Add an additional binary type
*/
+ @Override
public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) {
if (this.options.verbose) {
this.out.println(
@@ -350,6 +352,7 @@
* Add an additional compilation unit into the loop
* -> build compilation unit declarations, their bindings and record their results.
*/
+ @Override
public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) {
// Switch the current policy and compilation result for this unit to the requested one.
CompilationResult unitResult =
@@ -395,6 +398,7 @@
/**
* Add additional source types
*/
+ @Override
public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) {
this.problemReporter.abortDueToInternalError(
Messages.bind(Messages.abort_againstSourceModel, new String[] { String.valueOf(sourceTypes[0].getName()), String.valueOf(sourceTypes[0].getFileName()) }));
@@ -1213,6 +1217,7 @@
generateCode);
}
//{ObjectTeams: new function in ITypeRequester for use by Config:
+ @Override
public Parser getPlainParser() {
return null;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java
index 6463dfc..5d90989 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/DefaultErrorHandlingPolicies.java
@@ -21,12 +21,15 @@
*/
public static IErrorHandlingPolicy exitAfterAllProblems() {
return new IErrorHandlingPolicy() {
+ @Override
public boolean stopOnFirstError() {
return false;
}
+ @Override
public boolean proceedOnErrors(){
return false;
}
+ @Override
public boolean ignoreAllErrors() {
return false;
}
@@ -39,12 +42,15 @@
*/
public static IErrorHandlingPolicy exitOnFirstError() {
return new IErrorHandlingPolicy() {
+ @Override
public boolean stopOnFirstError() {
return true;
}
+ @Override
public boolean proceedOnErrors(){
return false;
}
+ @Override
public boolean ignoreAllErrors() {
return false;
}
@@ -56,12 +62,15 @@
*/
public static IErrorHandlingPolicy proceedOnFirstError() {
return new IErrorHandlingPolicy() {
+ @Override
public boolean stopOnFirstError() {
return true;
}
+ @Override
public boolean proceedOnErrors(){
return true;
}
+ @Override
public boolean ignoreAllErrors() {
return false;
}
@@ -73,12 +82,15 @@
*/
public static IErrorHandlingPolicy proceedWithAllProblems() {
return new IErrorHandlingPolicy() {
+ @Override
public boolean stopOnFirstError() {
return false;
}
+ @Override
public boolean proceedOnErrors(){
return true;
}
+ @Override
public boolean ignoreAllErrors() {
return false;
}
@@ -90,12 +102,15 @@
*/
public static IErrorHandlingPolicy ignoreAllProblems() {
return new IErrorHandlingPolicy() {
+ @Override
public boolean stopOnFirstError() {
return false;
}
+ @Override
public boolean proceedOnErrors(){
return true;
}
+ @Override
public boolean ignoreAllErrors() {
return true;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ProcessTaskManager.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ProcessTaskManager.java
index b202eb3..ad92cc2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ProcessTaskManager.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ProcessTaskManager.java
@@ -121,6 +121,7 @@
return next;
}
+@Override
public void run() {
//{ObjectTeams:
Config.addConfig(this.sharedConfig);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java
index d3f8567..dfce03b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ReadManager.java
@@ -145,6 +145,7 @@
return unit.getContents();
}
+@Override
public void run() {
try {
while (this.readingThreads != null && this.nextFileToRead < this.units.length) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
index 33aae2b..df294da 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java
@@ -31,6 +31,7 @@
super(left, right, operator);
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
Constant cst = this.left.optimizedBooleanConstant();
@@ -83,6 +84,7 @@
/**
* Code generation for a binary operation
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
@@ -183,6 +185,7 @@
/**
* Boolean operator code generation Optimized operations are: &&
*/
+ @Override
public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired) {
if (this.constant != Constant.NotAConstant) {
@@ -266,6 +269,7 @@
}
}
+ @Override
public boolean isCompactableOperation() {
return false;
}
@@ -273,6 +277,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.BinaryExpression#resolveType(org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public TypeBinding resolveType(BlockScope scope) {
TypeBinding result = super.resolveType(scope);
// check whether comparing identical expressions
@@ -284,6 +289,7 @@
return result;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.left.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
index 0b3d47d..1c0c27b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ASTNode.java
@@ -1328,6 +1328,7 @@
public int sourceEnd() {
return this.sourceEnd;
}
+ @Override
public String toString() {
return print(0, new StringBuffer(30)).toString();
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
index e3ed770..9de4695 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractMethodDeclaration.java
@@ -218,6 +218,7 @@
/*
* We cause the compilation task to abort to a given extent.
*/
+ @Override
public void abort(int abortLevel, CategorizedProblem problem) {
switch (abortLevel) {
@@ -386,6 +387,7 @@
}
}
+ @Override
public CompilationResult compilationResult() {
return this.compilationResult;
@@ -435,7 +437,8 @@
this.binding.bytecodeMissing = true;
// similarly for contained local types:
traverse(new ASTVisitor() {
- public boolean visit(TypeDeclaration type, BlockScope blockScope) {
+ @Override
+ public boolean visit(TypeDeclaration type, BlockScope blockScope) {
type.tagAsHavingErrors();
return true;
}
@@ -659,6 +662,7 @@
}
}
+ @Override
public CompilationUnitDeclaration getCompilationUnitDeclaration() {
if (this.scope != null) {
return this.scope.compilationUnitScope().referenceContext;
@@ -666,6 +670,7 @@
return null;
}
+ @Override
public boolean hasErrors() {
return this.ignoreFurtherInvestigation;
}
@@ -732,6 +737,7 @@
*/
public abstract void parseStatements(Parser parser, CompilationUnitDeclaration unit);
+ @Override
public StringBuffer print(int tab, StringBuffer output) {
if (this.javadoc != null) {
@@ -968,6 +974,7 @@
// SH}
}
+ @Override
public void tagAsHavingErrors() {
this.ignoreFurtherInvestigation = true;
//{ObjectTeams: avoid attempts to copy the bytecode of this method:
@@ -983,11 +990,13 @@
// SH}
}
+ @Override
public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
// Nothing to do for this context;
}
//{ObjectTeams: and remove it again:
+ @Override
public void resetErrorFlag() {
this.ignoreFurtherInvestigation = false;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
index f596eb4..0a468c5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AbstractVariableDeclaration.java
@@ -43,6 +43,7 @@
public TypeReference type;
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return flowInfo;
}
@@ -61,6 +62,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
*/
+ @Override
public TypeBinding[] genericTypeArguments() {
return null;
}
@@ -70,6 +72,7 @@
*/
public abstract int getKind();
+ @Override
public InferenceContext18 freshInferenceContext(Scope scope) {
return null;
}
@@ -77,6 +80,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#isSuperAccess()
*/
+ @Override
public boolean isSuperAccess() {
return false;
}
@@ -84,10 +88,12 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#isTypeAccess()
*/
+ @Override
public boolean isTypeAccess() {
return false;
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printAsExpression(indent, output);
switch(getKind()) {
@@ -125,6 +131,7 @@
return output;
}
+ @Override
public void resolve(BlockScope scope) {
// do nothing by default (redefined for local variables)
}
@@ -132,6 +139,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#setActualReceiverType(org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding)
*/
+ @Override
public void setActualReceiverType(ReferenceBinding receiverType) {
// do nothing by default
}
@@ -139,6 +147,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#setDepth(int)
*/
+ @Override
public void setDepth(int depth) {
this.hiddenVariableDepth = depth;
@@ -147,6 +156,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#setFieldIndex(int)
*/
+ @Override
public void setFieldIndex(int depth) {
// do nothing by default
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
index e240544..38c3dc8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java
@@ -130,6 +130,7 @@
}
// SH}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
//{ObjectTeams: redirect?
if (this.roleCreatorCall != null)
@@ -217,6 +218,7 @@
return null;
}
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
cleanUpInferenceContexts();
if (!valueRequired)
@@ -300,10 +302,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
*/
+@Override
public TypeBinding[] genericTypeArguments() {
return this.genericTypeArguments;
}
+@Override
public boolean isSuperAccess() {
//{ObjectTeams: within a creation method fake visibility:
if (isGenerated())
@@ -312,6 +316,7 @@
return false;
}
+@Override
public boolean isTypeAccess() {
return true;
}
@@ -369,6 +374,7 @@
}
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
if (this.type != null) { // type null for enum constant initializations
output.append("new "); //$NON-NLS-1$
@@ -396,6 +402,7 @@
return output.append(')');
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// Propagate the type checking to the arguments, and check if the constructor is defined.
final boolean isDiamond = this.type != null && (this.type.bits & ASTNode.IsDiamond) != 0;
@@ -688,10 +695,12 @@
}
// For allocation expressions, boxing compatibility is same as vanilla compatibility, since java.lang's wrapper types are not generic.
+@Override
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) {
return isPolyExpression() ? false : isCompatibleWith(scope.boxing(targetType), scope);
}
+@Override
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) {
if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null)
return false;
@@ -890,18 +899,22 @@
}
// SH}
+@Override
public void setActualReceiverType(ReferenceBinding receiverType) {
// ignored
}
+@Override
public void setDepth(int i) {
// ignored
}
+@Override
public void setFieldIndex(int i) {
// ignored
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
//{ObjectTeams: alternate ast
if (this.roleCreatorCall != null) {
@@ -929,17 +942,21 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#setExpectedType(org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public void setExpectedType(TypeBinding expectedType) {
this.typeExpected = expectedType;
}
+@Override
public void setExpressionContext(ExpressionContext context) {
this.expressionContext = context;
}
+@Override
public boolean isPolyExpression() {
return isPolyExpression(this.binding);
}
+@Override
public boolean isPolyExpression(MethodBinding method) {
return (this.expressionContext == ASSIGNMENT_CONTEXT || this.expressionContext == INVOCATION_CONTEXT) &&
this.type != null && (this.type.bits & ASTNode.IsDiamond) != 0;
@@ -948,22 +965,27 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#invocationTargetType()
*/
+@Override
public TypeBinding invocationTargetType() {
return this.typeExpected;
}
+@Override
public boolean statementExpression() {
return ((this.bits & ASTNode.ParenthesizedMASK) == 0);
}
//-- interface Invocation: --
+@Override
public MethodBinding binding() {
return this.binding;
}
+@Override
public Expression[] arguments() {
return this.arguments;
}
+@Override
public void registerInferenceContext(ParameterizedGenericMethodBinding method, InferenceContext18 infCtx18) {
if (this.inferenceContexts == null)
this.inferenceContexts = new SimpleLookupTable();
@@ -979,6 +1001,7 @@
}
}
+@Override
public InferenceContext18 getInferenceContext(ParameterizedMethodBinding method) {
if (this.inferenceContexts == null)
return null;
@@ -998,9 +1021,11 @@
}
//-- interface InvocationSite: --
+@Override
public ExpressionContext getExpressionContext() {
return this.expressionContext;
}
+@Override
public InferenceContext18 freshInferenceContext(Scope scope) {
return new InferenceContext18(scope, this.arguments, this, this.outerInferenceContext);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
index 5104723..db2faa1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java
@@ -150,30 +150,37 @@
}
return false; // if annotation is not found in the type reference, it must be one from SE7 location, typePathEntries captures the proper path entries for them.
}
+ @Override
public boolean visit(SingleTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
+ @Override
public boolean visit(ArrayTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
+ @Override
public boolean visit(ParameterizedSingleTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
+ @Override
public boolean visit(QualifiedTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
+ @Override
public boolean visit(ArrayQualifiedTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
+ @Override
public boolean visit(ParameterizedQualifiedTypeReference typeReference, BlockScope scope) {
return visit((TypeReference) typeReference, scope);
}
+ @Override
public boolean visit(Wildcard typeReference, BlockScope scope) {
visit((TypeReference) typeReference, scope);
if (this.continueSearch) {
@@ -189,6 +196,7 @@
return false;
}
+ @Override
public boolean visit(ArrayAllocationExpression allocationExpression, BlockScope scope) {
if (this.continueSearch) {
inspectArrayDimensions(allocationExpression.getAnnotationsOnDimensions(), allocationExpression.dimensions.length);
@@ -200,6 +208,7 @@
return false;
}
+ @Override
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer
@@ -638,6 +647,7 @@
}
this.targetBuffer.append(targetName);
}
+ @Override
public String toString() {
return this.targetBuffer.toString();
}
@@ -760,6 +770,7 @@
public abstract MemberValuePair[] memberValuePairs();
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append('@');
this.type.printExpression(0, output);
@@ -813,6 +824,7 @@
}
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
if (this.compilerAnnotation != null)
@@ -1329,8 +1341,10 @@
return this.resolvedType instanceof ReferenceBinding && ((ReferenceBinding) this.resolvedType).hasNullBit(bit);
}
+ @Override
public abstract void traverse(ASTVisitor visitor, BlockScope scope);
+ @Override
public abstract void traverse(ASTVisitor visitor, ClassScope scope);
public Annotation getPersistibleAnnotation() {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
index b0eb6aa..09c5425 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AnnotationMethodDeclaration.java
@@ -29,6 +29,7 @@
super(compilationResult);
}
+ @Override
public void generateCode(ClassFile classFile) {
classFile.generateMethodInfoHeader(this.binding);
int methodAttributeOffset = classFile.contentsOffset;
@@ -36,21 +37,25 @@
classFile.completeMethodInfo(this.binding, methodAttributeOffset, attributeNumber);
}
+ @Override
public boolean isAnnotationMethod() {
return true;
}
+ @Override
public boolean isMethod() {
return false;
}
+ @Override
public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
// nothing to do
// annotation type member declaration don't have any body
}
+ @Override
public StringBuffer print(int tab, StringBuffer output) {
printIndent(tab, output);
@@ -97,6 +102,7 @@
return output;
}
+ @Override
public void resolveStatements() {
super.resolveStatements();
@@ -147,6 +153,7 @@
}
}
+ @Override
public void traverse(
ASTVisitor visitor,
ClassScope classScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
index 4786427..b3bf7f5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Argument.java
@@ -170,10 +170,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
*/
+ @Override
public int getKind() {
return (this.bits & ASTNode.IsArgument) != 0 ? PARAMETER : LOCAL_VARIABLE;
}
+ @Override
public boolean isArgument() {
return true;
}
@@ -192,6 +194,7 @@
(this.type != null && this.type.hasNullTypeAnnotation(position)); // just in case
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
@@ -209,6 +212,7 @@
return output.append(this.name);
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
return print(indent, output).append(';');
@@ -274,6 +278,7 @@
return exceptionType;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java
index d1a04bd..bc0c8f6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayAllocationExpression.java
@@ -48,6 +48,7 @@
public Annotation [][] annotationsOnDimensions; // jsr308 style annotations.
public ArrayInitializer initializer;
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
for (int i = 0, max = this.dimensions.length; i < max; i++) {
Expression dim;
@@ -67,6 +68,7 @@
/**
* Code generation for a array allocation expression
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
@@ -101,6 +103,7 @@
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("new "); //$NON-NLS-1$
this.type.print(0, output);
@@ -122,6 +125,7 @@
return output;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
// Build an array type reference using the current dimensions
// The parser does not check for the fact that dimension may be null
@@ -215,6 +219,7 @@
return this.resolvedType;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
int dimensionsLength = this.dimensions.length;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
index d35d710..a362403 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayInitializer.java
@@ -41,6 +41,7 @@
super();
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
if (this.expressions != null) {
@@ -61,6 +62,7 @@
return flowInfo;
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
generateCode(null, null, currentScope, codeStream, valueRequired);
}
@@ -136,6 +138,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append('{');
@@ -155,6 +158,7 @@
return output.append('}');
}
+ @Override
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
// Array initializers can only occur on the right hand side of an assignment
// expression, therefore the expected type contains the valid information
@@ -238,6 +242,7 @@
return null;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
index 114a3d4..167f12a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayQualifiedTypeReference.java
@@ -37,11 +37,13 @@
this.bits |= ASTNode.HasTypeAnnotations;
}
+ @Override
public int dimensions() {
return this.dimensions;
}
+ @Override
public int extraDimensions() {
return this.extendedDimensions;
}
@@ -49,6 +51,7 @@
/**
@see org.eclipse.jdt.internal.compiler.ast.TypeReference#getAnnotationsOnDimensions(boolean)
*/
+ @Override
public Annotation[][] getAnnotationsOnDimensions(boolean useSourceOrder) {
if (useSourceOrder || this.annotationsOnDimensions == null || this.annotationsOnDimensions.length == 0 || this.extendedDimensions == 0 || this.extendedDimensions == this.dimensions)
return this.annotationsOnDimensions;
@@ -59,6 +62,7 @@
return externalAnnotations;
}
+ @Override
public void setAnnotationsOnDimensions(Annotation [][] annotationsOnDimensions) {
this.annotationsOnDimensions = annotationsOnDimensions;
}
@@ -66,6 +70,7 @@
/**
* @return char[][]
*/
+ @Override
public char [][] getParameterizedTypeName(){
int dim = this.dimensions;
char[] dimChars = new char[dim*2];
@@ -81,6 +86,7 @@
return qParamName;
}
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
if (this.resolvedType != null)
@@ -104,6 +110,7 @@
}
}
+ @Override
protected TypeBinding internalResolveType(Scope scope, int location) {
TypeBinding internalResolveType = super.internalResolveType(scope, location);
internalResolveType = ArrayTypeReference.maybeMarkArrayContentsNonNull(scope, internalResolveType, this.sourceStart, this.dimensions, null);
@@ -111,6 +118,7 @@
return internalResolveType;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
super.printExpression(indent, output);
@@ -142,6 +150,7 @@
return output;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -165,6 +174,7 @@
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java
index 4e7e494..e188762 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayReference.java
@@ -37,6 +37,7 @@
this.sourceStart = rec.sourceStart;
}
+@Override
public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean compoundAssignment) {
// TODO (maxime) optimization: unconditionalInits is applied to all existing calls
// account for potential ArrayIndexOutOfBoundsException:
@@ -56,6 +57,7 @@
return flowInfo;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
flowInfo = this.receiver.analyseCode(currentScope, flowContext, flowInfo);
this.receiver.checkNPE(currentScope, flowContext, flowInfo, 1);
@@ -66,6 +68,7 @@
return flowInfo;
}
+@Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
if ((this.resolvedType.tagBits & TagBits.AnnotationNullable) != 0) {
scope.problemReporter().arrayReferencePotentialNullReference(this);
@@ -75,6 +78,7 @@
}
}
+@Override
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
int pc = codeStream.position;
this.receiver.generateCode(currentScope, codeStream, true);
@@ -94,6 +98,7 @@
/**
* Code generation for a array reference
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
this.receiver.generateCode(currentScope, codeStream, true);
@@ -122,6 +127,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
this.receiver.generateCode(currentScope, codeStream, true);
if (this.receiver instanceof CastExpression // ((type[])null)[0]
@@ -155,6 +161,7 @@
codeStream.arrayAtPut(this.resolvedType.id, valueRequired);
}
+@Override
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
this.receiver.generateCode(currentScope, codeStream, true);
if (this.receiver instanceof CastExpression // ((type[])null)[0]
@@ -185,11 +192,13 @@
codeStream.arrayAtPut(this.resolvedType.id, false);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
this.receiver.printExpression(0, output).append('[');
return this.position.printExpression(0, output).append(']');
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (this.receiver instanceof CastExpression // no cast check for ((type[])null)[0]
@@ -213,6 +222,7 @@
return this.resolvedType;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.receiver.traverse(visitor, scope);
@@ -221,6 +231,7 @@
visitor.endVisit(this, scope);
}
+@Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
if (this.resolvedType != null && (this.resolvedType.tagBits & TagBits.AnnotationNullMASK) == 0L && this.resolvedType.isFreeTypeVariable()) {
return FlowInfo.FREE_TYPEVARIABLE;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
index 9594247..c60e36f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ArrayTypeReference.java
@@ -57,11 +57,13 @@
this.annotationsOnDimensions = annotationsOnDimensions;
}
+ @Override
public int dimensions() {
return this.dimensions;
}
+ @Override
public int extraDimensions() {
return this.extendedDimensions;
}
@@ -69,6 +71,7 @@
/**
@see org.eclipse.jdt.internal.compiler.ast.TypeReference#getAnnotationsOnDimensions(boolean)
*/
+ @Override
public Annotation[][] getAnnotationsOnDimensions(boolean useSourceOrder) {
if (useSourceOrder || this.annotationsOnDimensions == null || this.annotationsOnDimensions.length == 0 || this.extendedDimensions == 0 || this.extendedDimensions == this.dimensions)
return this.annotationsOnDimensions;
@@ -79,12 +82,14 @@
return externalAnnotations;
}
+ @Override
public void setAnnotationsOnDimensions(Annotation [][] annotationsOnDimensions) {
this.annotationsOnDimensions = annotationsOnDimensions;
}
/**
* @return char[][]
*/
+ @Override
public char [][] getParameterizedTypeName(){
int dim = this.dimensions;
char[] dimChars = new char[dim*2];
@@ -95,6 +100,7 @@
}
return new char[][]{ CharOperation.concat(this.token, dimChars) };
}
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
if (this.resolvedType != null) {
@@ -108,6 +114,7 @@
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
super.printExpression(indent, output);
@@ -139,6 +146,7 @@
return output;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -162,6 +170,7 @@
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -185,6 +194,7 @@
visitor.endVisit(this, scope);
}
+ @Override
protected TypeBinding internalResolveType(Scope scope, int location) {
TypeBinding internalResolveType = super.internalResolveType(scope, location);
internalResolveType = maybeMarkArrayContentsNonNull(scope, internalResolveType, this.sourceStart, this.dimensions,
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
index 17cbc01..de8b7d5 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java
@@ -44,6 +44,7 @@
this.sourceEnd = assertExpression.sourceEnd;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
this.preAssertInitStateIndex = currentScope.methodScope().recordInitializationStates(flowInfo);
@@ -102,6 +103,7 @@
}
}
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
return;
@@ -140,6 +142,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public void resolve(BlockScope scope) {
this.assertExpression.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
if (this.exceptionArgument != null) {
@@ -168,6 +171,7 @@
}
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.assertExpression.traverse(visitor, scope);
@@ -203,6 +207,7 @@
}
}
+@Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output);
output.append("assert "); //$NON-NLS-1$
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
index 29e31df..e74c95c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Assignment.java
@@ -87,6 +87,7 @@
}
// SH}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
@@ -160,6 +161,7 @@
}
}
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
// various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
@@ -192,17 +194,20 @@
return null;
}
+@Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
if ((this.implicitConversion & TypeIds.BOXING) != 0)
return FlowInfo.NON_NULL;
return this.expression.nullStatus(flowInfo, flowContext);
}
+@Override
public StringBuffer print(int indent, StringBuffer output) {
//no () when used as a statement
printIndent(indent, output);
return printExpressionNoParenthesis(indent, output);
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
//subclass redefine printExpressionNoParenthesis()
output.append('(');
@@ -214,11 +219,13 @@
return this.expression.printExpression(0, output);
}
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
//no () when used as a statement
return print(indent, output).append(';');
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// due to syntax lhs may be only a NameReference, a FieldReference or an ArrayReference
this.constant = Constant.NotAConstant;
@@ -310,6 +317,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#resolveTypeExpecting(org.eclipse.jdt.internal.compiler.lookup.BlockScope, org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public TypeBinding resolveTypeExpecting(BlockScope scope, TypeBinding expectedType) {
TypeBinding type = super.resolveTypeExpecting(scope, expectedType);
@@ -326,6 +334,7 @@
return type;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.lhs.traverse(visitor, scope);
@@ -333,9 +342,11 @@
}
visitor.endVisit(this, scope);
}
+@Override
public LocalVariableBinding localVariableBinding() {
return this.lhs.localVariableBinding();
}
+@Override
public boolean statementExpression() {
return ((this.bits & ASTNode.ParenthesizedMASK) == 0);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
index f4d9d99..7d29362 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BinaryExpression.java
@@ -61,6 +61,7 @@
this.sourceStart = expression.sourceStart;
this.sourceEnd = expression.sourceEnd;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// keep implementation in sync with CombinedBinaryExpression#analyseCode
try {
@@ -115,6 +116,7 @@
}
}
+@Override
public Constant optimizedBooleanConstant() {
return this.optimizedBooleanConstant == null ? this.constant : this.optimizedBooleanConstant;
}
@@ -125,6 +127,7 @@
// given the current focus of CombinedBinaryExpression on strings concatenation,
// we do not provide a general, non-recursive implementation of generateCode,
// but rely upon generateOptimizedStringConcatenationCreation instead
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (this.constant != Constant.NotAConstant) {
@@ -584,6 +587,7 @@
* Boolean operator code generation
* Optimized operations are: <, <=, >, >=, &, |, ^
*/
+@Override
public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired) {
if ((this.constant != Constant.NotAConstant) && (this.constant.typeID() == TypeIds.T_boolean)) {
super.generateOptimizedBoolean(
@@ -1549,6 +1553,7 @@
codeStream.recordPositionsFrom(codeStream.position, this.sourceEnd);
}
+@Override
public void generateOptimizedStringConcatenation(BlockScope blockScope, CodeStream codeStream, int typeID) {
// keep implementation in sync with CombinedBinaryExpression
// #generateOptimizedStringConcatenation
@@ -1581,6 +1586,7 @@
}
}
+@Override
public void generateOptimizedStringConcatenationCreation(BlockScope blockScope, CodeStream codeStream, int typeID) {
// keep implementation in sync with CombinedBinaryExpression
// #generateOptimizedStringConcatenationCreation
@@ -1615,6 +1621,7 @@
}
}
+@Override
public boolean isCompactableOperation() {
return true;
}
@@ -1786,6 +1793,7 @@
}
}
+@Override
public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
// keep implementation in sync with
// CombinedBinaryExpression#printExpressionNoParenthesis
@@ -1793,6 +1801,7 @@
return this.right.printExpression(0, output);
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// keep implementation in sync with CombinedBinaryExpression#resolveType
// and nonRecursiveResolveTypeUpwards
@@ -1915,6 +1924,7 @@
return this.resolvedType;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.left.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java
index 4e740a6..dfdbdf1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Block.java
@@ -45,6 +45,7 @@
this.explicitDeclarations = explicitDeclarations;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// empty block
if (this.statements == null) return flowInfo;
@@ -80,6 +81,7 @@
/**
* Code generation for a block
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
return;
@@ -96,6 +98,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public boolean isEmptyBlock() {
return this.statements == null;
}
@@ -109,6 +112,7 @@
return output;
}
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("{\n"); //$NON-NLS-1$
@@ -116,6 +120,7 @@
return printIndent(indent, output).append('}');
}
+@Override
public void resolve(BlockScope upperScope) {
if ((this.bits & UndocumentedEmptyBlock) != 0) {
upperScope.problemReporter().undocumentedEmptyBlock(this.sourceStart, this.sourceEnd);
@@ -179,6 +184,7 @@
}
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.statements != null) {
@@ -192,6 +198,7 @@
/**
* Dispatch the call on its last statement.
*/
+@Override
public void branchChainTo(BranchLabel label) {
if (this.statements != null) {
this.statements[this.statements.length - 1].branchChainTo(label);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BranchStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BranchStatement.java
index 6273515..bde5801 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BranchStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BranchStatement.java
@@ -34,6 +34,7 @@
*
* generate the finallyInvocationSequence.
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -66,6 +67,7 @@
}
}
+@Override
public void resolve(BlockScope scope) {
// nothing to do during name resolution
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java
index 3cb59b1..ff546fd 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/BreakStatement.java
@@ -22,6 +22,7 @@
super(label, sourceStart, e);
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// here requires to generate a sequence of finally blocks invocations depending corresponding
@@ -86,12 +87,14 @@
return FlowInfo.DEAD_END;
}
+@Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output).append("break"); //$NON-NLS-1$
if (this.label != null) output.append(' ').append(this.label);
return output.append(';');
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockscope) {
visitor.visit(this, blockscope);
visitor.endVisit(this, blockscope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
index 13b2789..4b9e4df 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CaseStatement.java
@@ -35,6 +35,7 @@
this.sourceStart = sourceStart;
}
+@Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -50,6 +51,7 @@
return flowInfo;
}
+@Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output);
if (this.constantExpression == null) {
@@ -65,6 +67,7 @@
* Case code generation
*
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -77,6 +80,7 @@
/**
* No-op : should use resolveCase(...) instead.
*/
+@Override
public void resolve(BlockScope scope) {
// no-op : should use resolveCase(...) instead.
}
@@ -85,6 +89,7 @@
* Returns the constant intValue or ordinal for enum constants. If constant is NotAConstant, then answers Float.MIN_VALUE
* @see org.eclipse.jdt.internal.compiler.ast.Statement#resolveCase(org.eclipse.jdt.internal.compiler.lookup.BlockScope, org.eclipse.jdt.internal.compiler.lookup.TypeBinding, org.eclipse.jdt.internal.compiler.ast.SwitchStatement)
*/
+@Override
public Constant resolveCase(BlockScope scope, TypeBinding switchExpressionType, SwitchStatement switchStatement) {
// switchExpressionType maybe null in error case
scope.enclosingCase = this; // record entering in a switch case block
@@ -135,6 +140,7 @@
return Constant.NotAConstant;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.constantExpression != null) this.constantExpression.traverse(visitor, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
index 8ab7f83..3f723f7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CastExpression.java
@@ -160,6 +160,7 @@
type.bits |= ASTNode.IgnoreRawTypeCheck; // no need to worry about raw type usage
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
FlowInfo result = this.expression
.analyseCode(currentScope, flowContext, flowInfo)
@@ -360,6 +361,7 @@
}
}
+@Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
if((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) {
return true;
@@ -370,20 +372,35 @@
private static void checkAlternateBinding(BlockScope scope, Expression receiver, TypeBinding receiverType, MethodBinding binding, Expression[] arguments, TypeBinding[] originalArgumentTypes, TypeBinding[] alternateArgumentTypes, final InvocationSite invocationSite) {
InvocationSite fakeInvocationSite = new InvocationSite(){
+ @Override
public TypeBinding[] genericTypeArguments() { return null; }
+ @Override
public boolean isSuperAccess(){ return invocationSite.isSuperAccess(); }
+ @Override
public boolean isTypeAccess() { return invocationSite.isTypeAccess(); }
+ @Override
public void setActualReceiverType(ReferenceBinding actualReceiverType) { /* ignore */}
+ @Override
public void setDepth(int depth) { /* ignore */}
+ @Override
public void setFieldIndex(int depth){ /* ignore */}
+ @Override
public int sourceStart() { return 0; }
+ @Override
public int sourceEnd() { return 0; }
+ @Override
public TypeBinding invocationTargetType() { return invocationSite.invocationTargetType(); }
+ @Override
public boolean receiverIsImplicitThis() { return invocationSite.receiverIsImplicitThis();}
+ @Override
public InferenceContext18 freshInferenceContext(Scope someScope) { return invocationSite.freshInferenceContext(someScope); }
+ @Override
public ExpressionContext getExpressionContext() { return invocationSite.getExpressionContext(); }
+ @Override
public boolean isQualifiedSuper() { return invocationSite.isQualifiedSuper(); }
+ @Override
public boolean checkingPotentialCompatibility() { return false; }
+ @Override
public void acceptPotentiallyCompatibleMethods(MethodBinding[] methods) {/* ignore */}
};
MethodBinding bindingIfNoCast;
@@ -441,6 +458,7 @@
return false;
}
+@Override
public boolean checkUnsafeCast(Scope scope, TypeBinding castType, TypeBinding expressionType, TypeBinding match, boolean isNarrowing) {
//{ObjectTeams: for weakened types use all available source level information:
if (match instanceof WeakenedTypeBinding)
@@ -561,6 +579,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
boolean annotatedCast = (this.type.bits & ASTNode.HasTypeAnnotations) != 0;
@@ -610,10 +629,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#localVariableBinding()
*/
+@Override
public LocalVariableBinding localVariableBinding() {
return this.expression.localVariableBinding();
}
+@Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
if ((this.implicitConversion & TypeIds.BOXING) != 0)
return FlowInfo.NON_NULL;
@@ -623,6 +644,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#optimizedBooleanConstant()
*/
+@Override
public Constant optimizedBooleanConstant() {
switch(this.resolvedType.id) {
case T_boolean :
@@ -632,6 +654,7 @@
return Constant.NotAConstant;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
int parenthesesCount = (this.bits & ASTNode.ParenthesizedMASK) >> ASTNode.ParenthesizedSHIFT;
String suffix = ""; //$NON-NLS-1$
@@ -644,6 +667,7 @@
return this.expression.printExpression(0, output).append(suffix);
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// compute a new constant if the cast is effective
@@ -790,6 +814,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#setExpectedType(org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public void setExpectedType(TypeBinding expectedType) {
this.expectedType = expectedType;
}
@@ -819,6 +844,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#tagAsNeedCheckCast()
*/
+@Override
public void tagAsNeedCheckCast() {
this.bits |= ASTNode.GenerateCheckcast;
}
@@ -826,10 +852,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#tagAsUnnecessaryCast(Scope, TypeBinding)
*/
+@Override
public void tagAsUnnecessaryCast(Scope scope, TypeBinding castType) {
this.bits |= ASTNode.UnnecessaryCast;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.type.traverse(visitor, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java
index cd5f124..c8c7b59 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CharLiteral.java
@@ -25,6 +25,7 @@
computeValue();
}
+@Override
public void computeConstant() {
//The source is a char[3] first and last char are '
//This is true for both regular char AND unicode char
@@ -86,6 +87,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -94,10 +96,12 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.CHAR;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
visitor.visit(this, blockScope);
visitor.endVisit(this, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java
index 2aa38c2..af4f965 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ClassLiteralAccess.java
@@ -53,6 +53,7 @@
this.sourceEnd = sourceEnd;
}
+ @Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -80,6 +81,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+ @Override
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
@@ -100,11 +102,13 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return this.type.print(0, output).append(".class"); //$NON-NLS-1$
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
@@ -187,6 +191,7 @@
return this.resolvedType;
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
index ec5bf6c..2ecceab 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Clinit.java
@@ -115,6 +115,7 @@
* @param classScope org.eclipse.jdt.internal.compiler.lookup.ClassScope
* @param classFile org.eclipse.jdt.internal.compiler.codegen.ClassFile
*/
+ @Override
public void generateCode(ClassScope classScope, ClassFile classFile) {
int clinitOffset = 0;
@@ -385,25 +386,30 @@
}
}
+ @Override
public boolean isClinit() {
return true;
}
+ @Override
public boolean isInitializationMethod() {
return true;
}
+ @Override
public boolean isStatic() {
return true;
}
+ @Override
public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
//the clinit is filled by hand ....
}
+ @Override
public StringBuffer print(int tab, StringBuffer output) {
printIndent(tab, output).append("<clinit>()"); //$NON-NLS-1$
@@ -411,11 +417,13 @@
return output;
}
+ @Override
public void resolve(ClassScope classScope) {
this.scope = new MethodScope(classScope, classScope.referenceContext, true);
}
+ @Override
public void traverse(
ASTVisitor visitor,
ClassScope classScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CombinedBinaryExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CombinedBinaryExpression.java
index 51e2849..dc24b51 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CombinedBinaryExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CombinedBinaryExpression.java
@@ -117,6 +117,7 @@
initArity(expression.left, expression.arity);
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
FlowInfo flowInfo) {
// keep implementation in sync with BinaryExpression#analyseCode
@@ -151,6 +152,7 @@
}
}
+@Override
public void generateOptimizedStringConcatenation(BlockScope blockScope,
CodeStream codeStream, int typeID) {
// keep implementation in sync with BinaryExpression and Expression
@@ -231,6 +233,7 @@
}
}
+@Override
public void generateOptimizedStringConcatenationCreation(BlockScope blockScope,
CodeStream codeStream, int typeID) {
// keep implementation in sync with BinaryExpression
@@ -313,6 +316,7 @@
}
}
+@Override
public StringBuffer printExpressionNoParenthesis(int indent,
StringBuffer output) {
// keep implementation in sync with
@@ -338,6 +342,7 @@
return this.right.printExpression(0, output);
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// keep implementation in sync with BinaryExpression#resolveType
if (this.referencesTable == null) {
@@ -356,6 +361,7 @@
return this.resolvedType;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (this.referencesTable == null) {
super.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
index 99d694b..cdace50 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java
@@ -68,6 +68,7 @@
public class CompilationUnitDeclaration extends ASTNode implements ProblemSeverities, ReferenceContext {
private static final Comparator STRING_LITERAL_COMPARATOR = new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
StringLiteral literal1 = (StringLiteral) o1;
StringLiteral literal2 = (StringLiteral) o2;
@@ -133,6 +134,7 @@
/*
* We cause the compilation task to abort to a given extent.
*/
+@Override
public void abort(int abortLevel, CategorizedProblem problem) {
switch (abortLevel) {
case AbortType :
@@ -251,6 +253,7 @@
}
}
+@Override
public CompilationResult compilationResult() {
return this.compilationResult;
}
@@ -485,6 +488,7 @@
}
}
+@Override
public CompilationUnitDeclaration getCompilationUnitDeclaration() {
return this;
}
@@ -545,10 +549,12 @@
return this.compilationResult.hasFunctionalTypes;
}
+@Override
public boolean hasErrors() {
return this.ignoreFurtherInvestigation;
}
+@Override
public StringBuffer print(int indent, StringBuffer output) {
if (this.currentPackage != null) {
//{ObjectTeams: package can have "team" modifier:
@@ -870,15 +876,18 @@
}
}
+@Override
public void tagAsHavingErrors() {
this.ignoreFurtherInvestigation = true;
}
+@Override
public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
// Nothing to do for this context;
}
//{ObjectTeams: and let us remove it again:
+@Override
public void resetErrorFlag() {
this.ignoreFurtherInvestigation = false;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
index 73e0f7e..8d87a4d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java
@@ -40,6 +40,7 @@
this.operator = operator ;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
FlowInfo flowInfo) {
// record setting a variable: various scenarii are possible, setting an array reference,
@@ -66,6 +67,7 @@
public boolean checkCastCompatibility() {
return true;
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
// various scenarii are possible, setting an array reference,
@@ -80,6 +82,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
return FlowInfo.NON_NULL;
// we may have complained on checkNPE, but we avoid duplicate error
@@ -113,12 +116,14 @@
return "unknown operator"; //$NON-NLS-1$
}
+ @Override
public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
this.lhs.printExpression(indent, output).append(' ').append(operatorToString()).append(' ');
return this.expression.printExpression(0, output) ;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
if (!(this.lhs instanceof Reference) || this.lhs.isThis()) {
@@ -210,6 +215,7 @@
return false ;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.lhs.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
index 65a74bc..02a97ad 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java
@@ -68,6 +68,7 @@
this.sourceEnd = valueIfFalse.sourceEnd;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext,
FlowInfo flowInfo) {
int initialComplaintLevel = (flowInfo.reachMode() & FlowInfo.UNREACHABLE) != 0 ? Statement.COMPLAINED_FAKE_REACHABLE : Statement.NOT_COMPLAINED;
@@ -187,6 +188,7 @@
return mergedInfo;
}
+ @Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
if ((this.nullStatus & FlowInfo.NULL) != 0)
scope.problemReporter().expressionNullReference(this);
@@ -237,6 +239,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+ @Override
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
@@ -327,6 +330,7 @@
/**
* Optimized boolean code generation for the conditional operator ?:
*/
+ @Override
public void generateOptimizedBoolean(
BlockScope currentScope,
CodeStream codeStream,
@@ -419,17 +423,20 @@
codeStream.recordPositionsFrom(pc, this.sourceEnd);
}
+ @Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
if ((this.implicitConversion & TypeIds.BOXING) != 0)
return FlowInfo.NON_NULL;
return this.nullStatus;
}
+ @Override
public Constant optimizedBooleanConstant() {
return this.optimizedBooleanConstant == null ? this.constant : this.optimizedBooleanConstant;
}
+ @Override
public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
this.condition.printExpression(indent, output).append(" ? "); //$NON-NLS-1$
@@ -437,6 +444,7 @@
return this.valueIfFalse.printExpression(0, output);
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
// JLS3 15.25
LookupEnvironment env = scope.environment();
@@ -707,14 +715,17 @@
return ok;
}
+ @Override
public void setExpectedType(TypeBinding expectedType) {
this.expectedType = expectedType;
}
+ @Override
public void setExpressionContext(ExpressionContext context) {
this.expressionContext = context;
}
+ @Override
public ExpressionContext getExpressionContext() {
return this.expressionContext;
}
@@ -733,6 +744,7 @@
return allPolys;
}
+ @Override
public boolean isPertinentToApplicability(TypeBinding targetType, MethodBinding method) {
return this.valueIfTrue.isPertinentToApplicability(targetType, method)
&& this.valueIfFalse.isPertinentToApplicability(targetType, method);
@@ -749,6 +761,7 @@
return this.valueIfTrue.isFunctionalType() || this.valueIfFalse.isFunctionalType(); // Even if only one arm is functional type, this will require a functional interface target
}
+ @Override
public boolean isPolyExpression() throws UnsupportedOperationException {
if (!this.use18specifics)
@@ -776,6 +789,7 @@
return this.isPolyExpression = true;
}
+ @Override
public boolean isCompatibleWith(TypeBinding left, Scope scope) {
return isPolyExpression() ? this.valueIfTrue.isCompatibleWith(left, scope) && this.valueIfFalse.isCompatibleWith(left, scope) :
super.isCompatibleWith(left, scope);
@@ -791,6 +805,7 @@
super.isBoxingCompatibleWith(targetType, scope);
}
+ @Override
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) {
if (super.sIsMoreSpecific(s, t, scope))
return true;
@@ -799,6 +814,7 @@
false;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.condition.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
index a5efa3a..3a048cf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ConstructorDeclaration.java
@@ -397,6 +397,7 @@
* @param classScope org.eclipse.jdt.internal.compiler.lookup.ClassScope
* @param classFile org.eclipse.jdt.internal.compiler.codegen.ClassFile
*/
+@Override
public void generateCode(ClassScope classScope, ClassFile classFile) {
//{ObjectTeams: if copied for implicit inheritance just adjust and write out
if(isRelevantCopied())
@@ -681,6 +682,7 @@
}
// SH}
+@Override
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
TypeReference fakeReturnType = new SingleTypeReference(this.selector, 0);
fakeReturnType.resolvedType = this.binding.declaringClass;
@@ -691,14 +693,17 @@
}
}
+@Override
public boolean isConstructor() {
return true;
}
+@Override
public boolean isDefaultConstructor() {
return (this.bits & ASTNode.IsDefaultConstructor) != 0;
}
+@Override
public boolean isInitializationMethod() {
return true;
}
@@ -736,6 +741,7 @@
return targetConstructor.isRecursive(visited);
}
+@Override
public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
//fill up the constructor body with its statements
if (((this.bits & ASTNode.IsDefaultConstructor) != 0) && this.constructorCall == null){
@@ -768,6 +774,7 @@
}
// SH}
+@Override
public StringBuffer printBody(int indent, StringBuffer output) {
output.append(" {"); //$NON-NLS-1$
if (this.constructorCall != null) {
@@ -795,6 +802,7 @@
return output;
}
+@Override
public void resolveJavadoc() {
if (this.binding == null || this.javadoc != null) {
super.resolveJavadoc();
@@ -820,6 +828,7 @@
* Type checking for constructor, just another method, except for special check
* for recursive constructor invocations.
*/
+@Override
public void resolveStatements() {
SourceTypeBinding sourceType = this.scope.enclosingSourceType();
if (!CharOperation.equals(sourceType.sourceName, this.selector)){
@@ -875,6 +884,7 @@
super.resolveStatements();
}
+@Override
public void traverse(ASTVisitor visitor, ClassScope classScope) {
if (visitor.visit(this, classScope)) {
if (this.javadoc != null) {
@@ -911,6 +921,7 @@
}
visitor.endVisit(this, classScope);
}
+@Override
public TypeParameter[] typeParameters() {
return this.typeParameters;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
index 518111b..1cf9e6d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContainerAnnotation.java
@@ -51,6 +51,7 @@
}
// Resolve the compiler synthesized container annotation.
+ @Override
public TypeBinding resolveType(BlockScope scope) {
if (this.compilerAnnotation != null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContinueStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContinueStatement.java
index 30b7d4c..e90ceba 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContinueStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ContinueStatement.java
@@ -22,6 +22,7 @@
super(label, sourceStart, sourceEnd);
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// here requires to generate a sequence of finally blocks invocations depending corresponding
@@ -89,12 +90,14 @@
return FlowInfo.DEAD_END;
}
+@Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output).append("continue "); //$NON-NLS-1$
if (this.label != null) output.append(this.label);
return output.append(';');
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
visitor.visit(this, blockScope);
visitor.endVisit(this, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
index de60c7c..d952384 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoStatement.java
@@ -42,6 +42,7 @@
if (action instanceof EmptyStatement) action.bits |= ASTNode.IsUsefulEmptyStatement;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
this.breakLabel = new BranchLabel();
this.continueLabel = new BranchLabel();
@@ -153,6 +154,7 @@
* Do statement code generation
*
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -207,6 +209,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output).append("do"); //$NON-NLS-1$
if (this.action == null)
@@ -219,6 +222,7 @@
return this.condition.printExpression(0, output).append(");"); //$NON-NLS-1$
}
+@Override
public void resolve(BlockScope scope) {
TypeBinding type = this.condition.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
this.condition.computeConversion(scope, type, type);
@@ -226,6 +230,7 @@
this.action.resolve(scope);
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.action != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java
index 1a7ef12..b28951f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/DoubleLiteral.java
@@ -25,6 +25,7 @@
super(token, s, e);
}
+@Override
public void computeConstant() {
Double computedValue;
boolean containsUnderscores = CharOperation.indexOf('_', this.source) > 0;
@@ -105,6 +106,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -113,10 +115,12 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.DOUBLE;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EmptyStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EmptyStatement.java
index 904e564..7e5c220 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EmptyStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EmptyStatement.java
@@ -25,11 +25,13 @@
this.sourceEnd = endPosition;
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return flowInfo;
}
// Report an error if necessary
+ @Override
public int complainIfUnreachable(FlowInfo flowInfo, BlockScope scope, int complaintLevel, boolean endOfBlock) {
// before 1.4, empty statements are tolerated anywhere
if (scope.compilerOptions().complianceLevel < ClassFileConstants.JDK1_4) {
@@ -38,14 +40,17 @@
return super.complainIfUnreachable(flowInfo, scope, complaintLevel, endOfBlock);
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream){
// no bytecode, no need to check for reachability or recording source positions
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
return printIndent(tab, output).append(';');
}
+ @Override
public void resolve(BlockScope scope) {
if ((this.bits & IsUsefulEmptyStatement) == 0) {
scope.problemReporter().superfluousSemicolon(this.sourceStart, this.sourceEnd);
@@ -54,6 +59,7 @@
}
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
index b7fdf29..f99c521 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/EqualExpression.java
@@ -140,6 +140,7 @@
// does not preclude the variable from being null in an enclosing scope
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
FlowInfo result;
if (((this.bits & OperatorMASK) >> OperatorSHIFT) == EQUAL_EQUAL) {
@@ -224,6 +225,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
@@ -248,6 +250,7 @@
* Boolean operator code generation
* Optimized operations are: == and !=
*/
+ @Override
public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired) {
if (this.constant != Constant.NotAConstant) {
@@ -830,9 +833,11 @@
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public boolean isCompactableOperation() {
return false;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
boolean leftIsCast, rightIsCast;
@@ -947,6 +952,7 @@
scope.problemReporter().notCompatibleTypesError(this, leftType, rightType);
return null;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.left.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
index b640d89..f1074e4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java
@@ -139,6 +139,7 @@
this.accessMode = accessMode;
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// must verify that exceptions potentially thrown by this expression are caught in the method.
@@ -198,6 +199,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -262,6 +264,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
*/
+ @Override
public TypeBinding[] genericTypeArguments() {
return this.genericTypeArguments;
}
@@ -275,6 +278,7 @@
return this.accessMode == Tsuper;
}
// Markus Witte}
+ @Override
public boolean isSuperAccess() {
// {ObjectTeams
/* orig:
@@ -284,6 +288,7 @@
// Markus Witte}
}
+ @Override
public boolean isTypeAccess() {
return true;
}
@@ -333,6 +338,7 @@
}
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
if (this.qualification != null) this.qualification.printExpression(0, output).append('.');
@@ -374,6 +380,7 @@
return output.append(");"); //$NON-NLS-1$
}
+ @Override
public void resolve(BlockScope scope) {
// the return type should be void for a constructor.
// the test is made into getConstructor
@@ -839,18 +846,22 @@
}
// SH}
+ @Override
public void setActualReceiverType(ReferenceBinding receiverType) {
// ignored
}
+ @Override
public void setDepth(int depth) {
// ignore for here
}
+ @Override
public void setFieldIndex(int depth) {
// ignore for here
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.qualification != null) {
@@ -870,10 +881,12 @@
}
// -- interface Invocation
+ @Override
public MethodBinding binding() {
return this.binding;
}
+ @Override
public void registerInferenceContext(ParameterizedGenericMethodBinding method, InferenceContext18 infCtx18) {
// Nothing to do.
}
@@ -883,6 +896,7 @@
// Nothing to do.
}
+ @Override
public InferenceContext18 getInferenceContext(ParameterizedMethodBinding method) {
return null;
}
@@ -892,10 +906,12 @@
// Nothing to do.
}
+ @Override
public Expression[] arguments() {
return this.arguments;
}
// -- interface InvocationSite: --
+ @Override
public InferenceContext18 freshInferenceContext(Scope scope) {
return new InferenceContext18(scope, this.arguments, this, null);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
index 1c7d215..8b95961 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java
@@ -120,16 +120,21 @@
*/
public enum DecapsulationState {
/** Decapsulation is not allowed. */
- NONE { public boolean isAllowed() { return false; }},
+ NONE { @Override
+ public boolean isAllowed() { return false; }},
/** This node refers to a confined role, decapsulation is not allowed. */
- CONFINED { public boolean isAllowed() { return false; }},
+ CONFINED { @Override
+ public boolean isAllowed() { return false; }},
/** This node is a playedBy reference, decapsulation is allowed, and not yet reported. */
- ALLOWED { public boolean isAllowed() { return true; }},
+ ALLOWED { @Override
+ public boolean isAllowed() { return true; }},
/** This node is either a playedBy reference for which decapsulation has been reported,
* or some other (generated) base reference for which decapsulation shall not be reported. */
- REPORTED { public boolean isAllowed() { return true; }},
+ REPORTED { @Override
+ public boolean isAllowed() { return true; }},
/** This mode is for team method return types: prefer local resolution, but tolerate base class as a fallback. */
- TOLERATED { public boolean isAllowed() { return false; }};
+ TOLERATED { @Override
+ public boolean isAllowed() { return false; }};
abstract public boolean isAllowed();
}
public DecapsulationState getBaseclassDecapsulation() {return DecapsulationState.NONE;}
@@ -351,6 +356,7 @@
super();
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return flowInfo;
}
@@ -903,6 +909,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -1201,6 +1208,7 @@
return convertedType;
}
+@Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
return printExpression(indent, output);
@@ -1208,10 +1216,12 @@
public abstract StringBuffer printExpression(int indent, StringBuffer output);
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
return print(indent, output).append(";"); //$NON-NLS-1$
}
+@Override
public void resolve(BlockScope scope) {
// drops the returning expression's type whatever the type is.
this.resolveType(scope);
@@ -1413,6 +1423,7 @@
* @param visitor
* @param scope
*/
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
// nothing to do
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
index bd667b6..6278139 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExpressionContext.java
@@ -21,9 +21,11 @@
Context induced by: ReturnStatement, ArrayInitializer, Assignment, FieldDeclaration and LocalDeclaration.
*/
ASSIGNMENT_CONTEXT {
+ @Override
public String toString() {
return "assignment context"; //$NON-NLS-1$
}
+ @Override
public boolean definesTargetType() {
return true;
}
@@ -37,9 +39,11 @@
CodeSnippetAllocationExpression and CodeSnippetMessageSend.
*/
INVOCATION_CONTEXT {
+ @Override
public String toString() {
return "invocation context"; //$NON-NLS-1$
}
+ @Override
public boolean definesTargetType() {
return true;
}
@@ -49,9 +53,11 @@
Context induced by: CastExpression.
*/
CASTING_CONTEXT {
+ @Override
public String toString() {
return "casting context"; //$NON-NLS-1$
}
+ @Override
public boolean definesTargetType() {
return false;
}
@@ -61,9 +67,11 @@
expressions get evaluated, unless they feature in one of the above contexts.
*/
VANILLA_CONTEXT {
+ @Override
public String toString() {
return "vanilla context"; //$NON-NLS-1$
}
+ @Override
public boolean definesTargetType() {
return false;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExtendedStringLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExtendedStringLiteral.java
index 05cfb0a..1be9862 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExtendedStringLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExtendedStringLiteral.java
@@ -36,6 +36,7 @@
/**
* Add the lit source to mine, just as if it was mine
*/
+ @Override
public ExtendedStringLiteral extendWith(CharLiteral lit) {
//update the source
@@ -50,6 +51,7 @@
/**
* Add the lit source to mine, just as if it was mine
*/
+ @Override
public ExtendedStringLiteral extendWith(StringLiteral lit) {
//uddate the source
@@ -66,11 +68,13 @@
return this;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return output.append("ExtendedStringLiteral{").append(this.source).append('}'); //$NON-NLS-1$
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java
index 25d3c21..9f8dc04 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FakedTrackingVariable.java
@@ -133,9 +133,11 @@
flowInfo.markNullStatus(this.binding, nullStatus); // mark that this flow has seen the resource
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream)
{ /* NOP - this variable is completely dummy, ie. for analysis only. */ }
+ @Override
public void resolve (BlockScope scope) {
// only need the binding, which is used as reference in FlowInfo methods.
this.binding = new LocalVariableBinding(
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java
index f8c021c..bf36b06 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FalseLiteral.java
@@ -24,6 +24,7 @@
public FalseLiteral(int s , int e) {
super(s,e);
}
+@Override
public void computeConstant() {
this.constant = BooleanConstant.fromValue(false);
}
@@ -34,6 +35,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -41,6 +43,7 @@
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired) {
// falseLabel being not nil means that we will not fall through into the FALSE case
@@ -56,15 +59,18 @@
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.BOOLEAN;
}
/**
*
*/
+@Override
public char[] source() {
return source;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
//{ObjectTeams: hide synthetic nodes from visitors (e.g., inserted into a base call)
if (this.isGenerated) return;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
index b1b474a..5bc293f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldDeclaration.java
@@ -146,6 +146,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
return;
@@ -180,6 +181,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
*/
+@Override
public int getKind() {
return this.type == null ? ENUM_CONSTANT : FIELD;
}
@@ -196,6 +198,7 @@
return (this.modifiers & ClassFileConstants.AccFinal) != 0;
}
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
if (this.javadoc != null) {
this.javadoc.print(indent, output);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
index 93b2020..ca587c6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java
@@ -118,6 +118,7 @@
}
+@Override
public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
// compound assignment extra work
if (isCompound) { // check the variable part is initialized if blank final
@@ -182,10 +183,12 @@
return flowInfo;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return analyseCode(currentScope, flowContext, flowInfo, true);
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
boolean nonStatic = !this.binding.isStatic();
this.receiver.analyseCode(currentScope, flowContext, flowInfo, nonStatic);
@@ -208,6 +211,7 @@
return flowInfo;
}
+@Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
if (flowContext.isNullcheckedFieldAccess(this)) {
return true; // enough seen
@@ -218,6 +222,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.jdt.internal.compiler.lookup.Scope, org.eclipse.jdt.internal.compiler.lookup.TypeBinding, org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
if (runtimeTimeType == null || compileTimeType == null)
return;
@@ -246,10 +251,12 @@
super.computeConversion(scope, runtimeTimeType, compileTimeType);
}
+@Override
public FieldBinding fieldBinding() {
return this.binding;
}
+@Override
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
int pc = codeStream.position;
FieldBinding codegenBinding = this.binding.original();
@@ -274,6 +281,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (this.constant != Constant.NotAConstant) {
@@ -380,6 +388,7 @@
codeStream.recordPositionsFrom(pc, this.sourceEnd);
}
+@Override
public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
boolean isStatic;
// check if compound assignment is the only usage of a private field
@@ -429,6 +438,7 @@
// no need for generic cast as value got dupped
}
+@Override
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
boolean isStatic;
// check if postIncrement is the only usage of a private field
@@ -494,14 +504,17 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
*/
+@Override
public TypeBinding[] genericTypeArguments() {
return null;
}
+@Override
public InferenceContext18 freshInferenceContext(Scope scope) {
return null;
}
+@Override
public boolean isEquivalent(Reference reference) {
// only consider field references relative to "this":
if (this.receiver.isThis() && !(this.receiver instanceof QualifiedThisReference)) {
@@ -553,6 +566,7 @@
return result;
}
+@Override
public boolean isSuperAccess() {
return this.receiver.isSuper();
}
@@ -562,10 +576,12 @@
return this.receiver.isQualifiedSuper();
}
+@Override
public boolean isTypeAccess() {
return this.receiver != null && this.receiver.isTypeReference();
}
+@Override
public FieldBinding lastFieldBinding() {
return this.binding;
}
@@ -658,6 +674,7 @@
}
// SH}
+@Override
public Constant optimizedBooleanConstant() {
if (this.resolvedType == null)
return Constant.NotAConstant;
@@ -673,6 +690,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
*/
+@Override
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
if (this.genericCast != null)
@@ -711,6 +729,7 @@
return convertedType;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
//{ObjectTeams: remove unneeded dot in debug view
if (this.receiver.isImplicitThis())
@@ -720,6 +739,7 @@
return this.receiver.printExpression(0, output).append('.').append(this.token);
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature type of the field.
// constants are propaged when the field is final
@@ -873,6 +893,7 @@
* @param scope enclosing scope of this node.
* @return whether decapsulation actually takes place.
*/
+@Override
protected boolean checkBaseclassDecapsulation(Scope scope) {
if ( this.binding.problemId() == ProblemReasons.ReceiverTypeNotVisible
&& this.receiver.getBaseclassDecapsulation().isAllowed())
@@ -894,10 +915,12 @@
return false;
}
//SH}
+@Override
public void setActualReceiverType(ReferenceBinding receiverType) {
this.actualReceiverType = receiverType;
}
+@Override
public void setDepth(int depth) {
this.bits &= ~ASTNode.DepthMASK; // flush previous depth if any
if (depth > 0) {
@@ -905,10 +928,12 @@
}
}
+@Override
public void setFieldIndex(int index) {
// ignored
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.receiver.traverse(visitor, scope);
@@ -916,6 +941,7 @@
visitor.endVisit(this, scope);
}
+@Override
public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations) {
if (this.binding != null) {
if (supportTypeAnnotations
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java
index f3e4b26..99f77ad 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FloatLiteral.java
@@ -26,6 +26,7 @@
super(token, s, e);
}
+@Override
public void computeConstant() {
Float computedValue;
boolean containsUnderscores = CharOperation.indexOf('_', this.source) > 0;
@@ -106,6 +107,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -114,10 +116,12 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.FLOAT;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
index 7a19512..7a13a08 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java
@@ -65,6 +65,7 @@
}
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
this.breakLabel = new BranchLabel();
this.continueLabel = new BranchLabel();
@@ -243,6 +244,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
@@ -354,6 +356,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output).append("for ("); //$NON-NLS-1$
@@ -387,6 +390,7 @@
return output;
}
+ @Override
public void resolve(BlockScope upperScope) {
//{ObjectTeams: don't discard scope from previous attempt:
if (this.scope == null)
@@ -407,6 +411,7 @@
this.action.resolve(this.scope);
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
index c590ba9..92a2d29 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ForeachStatement.java
@@ -100,6 +100,7 @@
this.kind = -1;
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// initialize break and continue labels
this.breakLabel = new BranchLabel();
@@ -210,6 +211,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
@@ -421,6 +423,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output).append("for ("); //$NON-NLS-1$
@@ -441,6 +444,7 @@
return output;
}
+ @Override
public void resolve(BlockScope upperScope) {
//{ObjectTeams: don't discard scope from previous attempt:
if (this.scope == null)
@@ -632,6 +636,7 @@
}
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
index 32cbece..252148d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FunctionalExpression.java
@@ -75,6 +75,7 @@
super();
}
+ @Override
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) {
return false;
}
@@ -88,21 +89,26 @@
return null;
}
+ @Override
public void setExpectedType(TypeBinding expectedType) {
this.expectedType = expectedType;
}
+ @Override
public void setExpressionContext(ExpressionContext context) {
this.expressionContext = context;
}
+ @Override
public ExpressionContext getExpressionContext() {
return this.expressionContext;
}
+ @Override
public boolean isPolyExpression(MethodBinding candidate) {
return true;
}
+ @Override
public boolean isPolyExpression() {
return true; // always as per introduction of part D, JSR 335
}
@@ -112,6 +118,7 @@
return true;
}
+ @Override
public boolean isPertinentToApplicability(TypeBinding targetType, MethodBinding method) {
if (targetType instanceof TypeVariableBinding) {
TypeVariableBinding typeVariable = (TypeVariableBinding) targetType;
@@ -128,6 +135,7 @@
return true;
}
+ @Override
public TypeBinding invocationTargetType() {
if (this.expectedType == null) return null;
// when during inference this expression mimics as an invocationSite,
@@ -143,6 +151,7 @@
return null;
}
+ @Override
public TypeBinding expectedType() {
return this.expectedType;
}
@@ -170,6 +179,7 @@
return 0; // not reached.
}
+ @Override
public TypeBinding resolveType(BlockScope blockScope) {
return resolveType(blockScope, false);
}
@@ -246,17 +256,20 @@
}
}
+ @Override
public boolean visit(ReferenceBinding referenceBinding) {
checkVisibility(referenceBinding);
return true;
}
+ @Override
public boolean visit(ParameterizedTypeBinding parameterizedTypeBinding) {
checkVisibility(parameterizedTypeBinding);
return true;
}
+ @Override
public boolean visit(RawTypeBinding rawTypeBinding) {
checkVisibility(rawTypeBinding);
return true;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
index ad4c07d..868c999 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java
@@ -57,6 +57,7 @@
this.sourceEnd = sourceEnd;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// process the condition
FlowInfo conditionFlowInfo = this.condition.analyseCode(currentScope, flowContext, flowInfo);
@@ -162,6 +163,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
return;
@@ -259,6 +261,7 @@
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output).append("if ("); //$NON-NLS-1$
this.condition.printExpression(0, output).append(")\n"); //$NON-NLS-1$
@@ -272,6 +275,7 @@
return output;
}
+@Override
public void resolve(BlockScope scope) {
TypeBinding type = this.condition.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
this.condition.computeConversion(scope, type, type);
@@ -281,6 +285,7 @@
this.elseStatement.resolve(scope);
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.condition.traverse(visitor, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java
index c2e0849..f84e7c8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ImportReference.java
@@ -94,6 +94,7 @@
}
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
return print(indent, output, true);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
index 3e72271..213f3c2 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Initializer.java
@@ -37,6 +37,7 @@
}
}
+ @Override
public FlowInfo analyseCode(
MethodScope currentScope,
FlowContext flowContext,
@@ -55,6 +56,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
@@ -68,10 +70,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
*/
+ @Override
public int getKind() {
return INITIALIZER;
}
+ @Override
public boolean isStatic() {
return (this.modifiers & ClassFileConstants.AccStatic) != 0;
@@ -86,6 +90,7 @@
parser.parse(this, typeDeclaration, unit);
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
if (this.modifiers != 0) {
@@ -109,6 +114,7 @@
return output;
}
+ @Override
public void resolve(MethodScope scope) {
FieldBinding previousField = scope.initializedField;
@@ -141,6 +147,7 @@
return this.methodBinding;
}
+ @Override
public void traverse(ASTVisitor visitor, MethodScope scope) {
if (visitor.visit(this, scope)) {
if (this.block != null) this.block.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
index 6bf448f..e3572db 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java
@@ -69,6 +69,7 @@
this.sourceEnd = type.sourceEnd;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
//{ObjectTeams: is it a role type check?
if (this.roleCheckExpr != null)
@@ -128,6 +129,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
//{ObjectTeams: is it a role type check?
if (this.roleCheckExpr != null) {
@@ -146,11 +148,13 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
this.expression.printExpression(indent, output).append(" instanceof "); //$NON-NLS-1$
return this.type.print(0, output);
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
TypeBinding expressionType = this.expression.resolveType(scope);
@@ -178,12 +182,14 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#tagAsUnnecessaryCast(Scope,TypeBinding)
*/
+@Override
public void tagAsUnnecessaryCast(Scope scope, TypeBinding castType) {
// null is not instanceof Type, recognize direct scenario
if (this.expression.resolvedType != TypeBinding.NULL)
scope.problemReporter().unnecessaryInstanceof(this, castType);
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.expression.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java
index b1c7fb5..6790a47 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteral.java
@@ -66,6 +66,7 @@
this.value = value;
this.constant = constant;
}
+@Override
public void computeConstant() {
char[] token = this.reducedForm != null ? this.reducedForm : this.source;
int tokenLength = token.length;
@@ -161,6 +162,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -169,9 +171,11 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.INT;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java
index f175fe7..58e5675 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntLiteralMinValue.java
@@ -20,6 +20,7 @@
super(token, reducedToken, start, end, Integer.MIN_VALUE, IntConstant.fromValue(Integer.MIN_VALUE));
}
+@Override
public void computeConstant(){
/*precomputed at creation time*/ }
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
index d2c81ac..3c3273c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/IntersectionCastTypeReference.java
@@ -42,6 +42,7 @@
}
}
+ @Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
throw new UnsupportedOperationException(); // no syntax for this.
}
@@ -49,6 +50,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getLastToken()
*/
+ @Override
public char[] getLastToken() {
return null;
}
@@ -56,10 +58,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
return null; // not supported here - combined with resolveType(...)
}
+ @Override
public TypeReference[] getTypeReferences() {
return this.typeReferences;
}
@@ -67,6 +71,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
+ @Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
int length = this.typeReferences.length;
@@ -158,6 +163,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeName()
*/
+ @Override
public char[][] getTypeName() {
// we need to keep a return value that is a char[][]
return this.typeReferences[0].getTypeName();
@@ -166,6 +172,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
int length = this.typeReferences == null ? 0 : this.typeReferences.length;
@@ -179,6 +186,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.ClassScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
throw new UnsupportedOperationException("Unexpected traversal request: IntersectionTypeReference in class scope"); //$NON-NLS-1$
}
@@ -186,6 +194,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.Expression#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
int length = this.typeReferences == null ? 0 : this.typeReferences.length;
printIndent(indent, output);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
index c734d6b..189932d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Javadoc.java
@@ -165,6 +165,7 @@
/*
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output).append("/**\n"); //$NON-NLS-1$
if (this.paramReferences != null) {
@@ -951,6 +952,7 @@
}
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.paramReferences != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java
index 903f444..57ac495 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocAllocationExpression.java
@@ -158,17 +158,21 @@
return allocationType;
}
+ @Override
public boolean isSuperAccess() {
return (this.bits & ASTNode.SuperAccess) != 0;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
return internalResolveType(scope);
}
+ @Override
public TypeBinding resolveType(ClassScope scope) {
return internalResolveType(scope);
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.typeArguments != null) {
@@ -186,6 +190,7 @@
}
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.typeArguments != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java
index 509bf8d..3a5fd92 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArgumentExpression.java
@@ -83,6 +83,7 @@
return null;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
if (this.argument == null) {
if (this.token != null) {
@@ -95,16 +96,19 @@
return output;
}
+ @Override
public void resolve(BlockScope scope) {
if (this.argument != null) {
this.argument.resolve(scope);
}
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
return internalResolveType(scope);
}
+ @Override
public TypeBinding resolveType(ClassScope scope) {
return internalResolveType(scope);
}
@@ -113,6 +117,7 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.argument != null) {
@@ -121,6 +126,7 @@
}
visitor.endVisit(this, blockScope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.argument != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java
index 43d4fba..2b19428 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArrayQualifiedTypeReference.java
@@ -26,9 +26,11 @@
super(typeRef.tokens, dim, typeRef.sourcePositions);
}
+ @Override
protected void reportInvalidType(Scope scope) {
scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
}
+ @Override
protected void reportDeprecatedType(TypeBinding type, Scope scope) {
scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers());
}
@@ -37,11 +39,13 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java
index 9c2d921..3550285 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocArraySingleTypeReference.java
@@ -24,9 +24,11 @@
this.bits |= InsideJavadoc;
}
+ @Override
protected void reportInvalidType(Scope scope) {
scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
}
+ @Override
protected void reportDeprecatedType(TypeBinding type, Scope scope) {
scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers());
}
@@ -35,11 +37,13 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java
index b6bab94..496006b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocFieldReference.java
@@ -111,10 +111,12 @@
return this.resolvedType = this.binding.type;
}
+ @Override
public boolean isSuperAccess() {
return (this.bits & ASTNode.SuperAccess) != 0;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
if (this.receiver != null) {
@@ -124,10 +126,12 @@
return output;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
return internalResolveType(scope);
}
+ @Override
public TypeBinding resolveType(ClassScope scope) {
return internalResolveType(scope);
}
@@ -136,6 +140,7 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
@@ -145,6 +150,7 @@
}
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
index c18dd29..5dfb80b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocImplicitTypeReference.java
@@ -27,6 +27,7 @@
this.sourceEnd = pos;
}
+ @Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
return null;
}
@@ -34,11 +35,13 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
this.constant = Constant.NotAConstant;
return this.resolvedType = scope.enclosingReceiverType();
}
+ @Override
public char[] getLastToken() {
return this.token;
}
@@ -46,6 +49,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeName()
*/
+ @Override
public char[][] getTypeName() {
if (this.token != null) {
char[][] tokens = { this.token };
@@ -53,6 +57,7 @@
}
return null;
}
+ @Override
public boolean isThis() {
return true;
}
@@ -61,6 +66,7 @@
* Resolves type on a Block, Class or CompilationUnit scope.
* We need to modify resoling behavior to avoid raw type creation.
*/
+ @Override
protected TypeBinding internalResolveType(Scope scope, int location) {
// handle the error here
this.constant = Constant.NotAConstant;
@@ -114,23 +120,28 @@
return this.resolvedType = type;
}
+ @Override
protected void reportInvalidType(Scope scope) {
scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
}
+ @Override
protected void reportDeprecatedType(TypeBinding type, Scope scope) {
scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers());
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return new StringBuffer();
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
index 7b144aa..1211380 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocMessageSend.java
@@ -202,10 +202,12 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#isSuperAccess()
*/
+ @Override
public boolean isSuperAccess() {
return (this.bits & ASTNode.SuperAccess) != 0;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
if (this.receiver != null) {
@@ -221,10 +223,12 @@
return output.append(')');
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
return internalResolveType(scope);
}
+ @Override
public TypeBinding resolveType(ClassScope scope) {
return internalResolveType(scope);
}
@@ -233,6 +237,7 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
if (this.receiver != null) {
@@ -250,6 +255,7 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.receiver != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java
index 431ea1e..a130bb4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocQualifiedTypeReference.java
@@ -65,21 +65,26 @@
}
return this.resolvedType;
}
+ @Override
protected void reportDeprecatedType(TypeBinding type, Scope scope) {
scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers());
}
+ @Override
protected void reportDeprecatedType(TypeBinding type, Scope scope, int index) {
scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers(), index);
}
+ @Override
protected void reportInvalidType(Scope scope) {
scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
}
+ @Override
public TypeBinding resolveType(BlockScope blockScope, boolean checkBounds, int location) {
return internalResolveType(blockScope, checkBounds);
}
+ @Override
public TypeBinding resolveType(ClassScope classScope, int location) {
return internalResolveType(classScope, false);
}
@@ -88,11 +93,13 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java
index 25cb038..3a89eec 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocReturnStatement.java
@@ -24,6 +24,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.Statement#resolve(org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding = null;
@@ -43,6 +44,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.Statement#printStatement(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output).append("return"); //$NON-NLS-1$
if ((this.bits & ASTNode.Empty) == 0)
@@ -54,6 +56,7 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleNameReference.java
index 3c86c72..e2d86da 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleNameReference.java
@@ -27,6 +27,7 @@
this.bits |= InsideJavadoc;
}
+ @Override
public void resolve(BlockScope scope) {
resolve(scope, true, scope.compilerOptions().reportUnusedParameterIncludeDocCommentReference);
}
@@ -65,6 +66,7 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
@@ -73,6 +75,7 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java
index 7abcefa..954c24a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/JavadocSingleTypeReference.java
@@ -41,6 +41,7 @@
/*
* We need to modify resolving behavior to handle package references
*/
+ @Override
protected TypeBinding internalResolveType(Scope scope, int location) {
// handle the error here
this.constant = Constant.NotAConstant;
@@ -114,10 +115,12 @@
}
return this.resolvedType;
}
+ @Override
protected void reportDeprecatedType(TypeBinding type, Scope scope) {
scope.problemReporter().javadocDeprecatedType(type, this, scope.getDeclarationModifiers());
}
+ @Override
protected void reportInvalidType(Scope scope) {
scope.problemReporter().javadocInvalidType(this, this.resolvedType, scope.getDeclarationModifiers());
}
@@ -126,11 +129,13 @@
* Redefine to capture javadoc specific signatures
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java
index 3045815..f28efc6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LabeledStatement.java
@@ -39,6 +39,7 @@
this.sourceEnd = sourceEnd;
}
+ @Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -78,6 +79,7 @@
}
}
+ @Override
public ASTNode concreteStatement() {
// return statement.concreteStatement(); // for supporting nested labels: a:b:c: someStatement (see 21912)
@@ -92,6 +94,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
@@ -113,6 +116,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output).append(this.label).append(": "); //$NON-NLS-1$
@@ -123,6 +127,7 @@
return output;
}
+ @Override
public void resolve(BlockScope scope) {
if (this.statement != null) {
@@ -131,6 +136,7 @@
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
index 1930999..bc8076d 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
@@ -177,6 +177,7 @@
return this.original;
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
if (this.shouldCaptureInstance) {
this.binding.modifiers &= ~ClassFileConstants.AccStatic;
@@ -216,6 +217,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public boolean kosherDescriptor(Scope currentScope, MethodBinding sam, boolean shouldChatter) {
if (sam.typeVariables != Binding.NO_TYPE_VARIABLES) {
if (shouldChatter)
@@ -231,6 +233,7 @@
* @see org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(MethodBinding)
* @see org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(ClassScope)
*/
+ @Override
public TypeBinding resolveType(BlockScope blockScope, boolean skipKosherCheck) {
boolean argumentsTypeElided = argumentsTypeElided();
@@ -506,6 +509,7 @@
return blockScope.environment().createParameterizedType(genericType, types, withWildCards.enclosingType());
}
+ @Override
public boolean argumentsTypeElided() {
return this.arguments.length > 0 && this.arguments[0].hasElidedType();
}
@@ -526,6 +530,7 @@
compilerOptions.analyseResourceLeaks = oldAnalyseResources;
}
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, final FlowInfo flowInfo) {
if (this.ignoreFurtherInvestigation)
@@ -631,22 +636,27 @@
}
}
+ @Override
public boolean isPertinentToApplicability(final TypeBinding targetType, final MethodBinding method) {
class NotPertientToApplicability extends RuntimeException {
private static final long serialVersionUID = 1L;
}
class ResultsAnalyser extends ASTVisitor {
+ @Override
public boolean visit(TypeDeclaration type, BlockScope skope) {
return false;
}
+ @Override
public boolean visit(TypeDeclaration type, ClassScope skope) {
return false;
}
+ @Override
public boolean visit(LambdaExpression type, BlockScope skope) {
return false;
}
- public boolean visit(ReturnStatement returnStatement, BlockScope skope) {
+ @Override
+ public boolean visit(ReturnStatement returnStatement, BlockScope skope) {
if (returnStatement.expression != null) {
if (!returnStatement.expression.isPertinentToApplicability(targetType, method))
throw new NotPertientToApplicability();
@@ -695,6 +705,7 @@
return this.valueCompatible;
}
+ @Override
public StringBuffer printExpression(int tab, StringBuffer output) {
return printExpression(tab, output, false);
}
@@ -729,6 +740,7 @@
return this.descriptor != null && this.descriptor.isValidBinding() ? this.descriptor.returnType : null;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
@@ -762,16 +774,20 @@
private void analyzeShape() { // Simple minded analysis for code assist & potential compatibility.
class ShapeComputer extends ASTVisitor {
+ @Override
public boolean visit(TypeDeclaration type, BlockScope skope) {
return false;
}
+ @Override
public boolean visit(TypeDeclaration type, ClassScope skope) {
return false;
}
+ @Override
public boolean visit(LambdaExpression type, BlockScope skope) {
return false;
}
- public boolean visit(ReturnStatement returnStatement, BlockScope skope) {
+ @Override
+ public boolean visit(ReturnStatement returnStatement, BlockScope skope) {
if (returnStatement.expression != null) {
LambdaExpression.this.valueCompatible = true;
LambdaExpression.this.voidCompatible = false;
@@ -830,6 +846,7 @@
return true;
}
+ @Override
public boolean isCompatibleWith(TypeBinding targetType, final Scope skope) {
if (!super.isPertinentToApplicability(targetType, null))
@@ -953,6 +970,7 @@
* @param targetType the target functional type against which inference is attempted, must be a non-null valid functional type
* @return a resolved copy of 'this' or null if significant errors where encountered
*/
+ @Override
public LambdaExpression resolveExpressionExpecting(TypeBinding targetType, Scope skope, InferenceContext18 context) {
LambdaExpression copy = null;
try {
@@ -963,6 +981,7 @@
return copy;
}
+ @Override
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope skope) {
// 15.12.2.5
@@ -1088,10 +1107,12 @@
}
}
+ @Override
public CompilationResult compilationResult() {
return this.compilationResult;
}
+ @Override
public void abort(int abortLevel, CategorizedProblem problem) {
switch (abortLevel) {
@@ -1106,20 +1127,24 @@
}
}
+ @Override
public CompilationUnitDeclaration getCompilationUnitDeclaration() {
return this.enclosingScope == null ? null : this.enclosingScope.compilationUnitScope().referenceContext;
}
+ @Override
public boolean hasErrors() {
return this.ignoreFurtherInvestigation;
}
//{ObjectTeams: and remove it again:
+ @Override
public void resetErrorFlag() {
this.ignoreFurtherInvestigation = false;
}
// SH}
+ @Override
public void tagAsHavingErrors() {
this.ignoreFurtherInvestigation = true;
Scope parent = this.enclosingScope.parent;
@@ -1140,6 +1165,7 @@
}
}
+ @Override
public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
switch (problemId) {
// 15.27.3 requires exception throw related errors to not influence congruence. Other errors should. Also don't abort shape analysis.
@@ -1305,6 +1331,7 @@
}
// Return the actual method binding devoid of synthetics.
+ @Override
public MethodBinding getMethodBinding() {
if (this.actualMethodBinding == null) {
if (this.binding != null) {
@@ -1326,6 +1353,7 @@
return this.actualMethodBinding;
}
+ @Override
public int diagnosticsSourceEnd() {
return this.body instanceof Block ? this.arrowPosition : this.sourceEnd;
}
@@ -1359,15 +1387,19 @@
return null;
class LambdaTypeBinding extends ReferenceBinding {
+ @Override
public MethodBinding[] methods() {
return new MethodBinding [] { getMethodBinding() };
}
+ @Override
public char[] sourceName() {
return TypeConstants.LAMBDA_TYPE;
}
+ @Override
public ReferenceBinding superclass() {
return LambdaExpression.this.scope.getJavaLangObject();
}
+ @Override
public ReferenceBinding[] superInterfaces() {
return new ReferenceBinding[] { (ReferenceBinding) LambdaExpression.this.resolvedType };
}
@@ -1375,6 +1407,7 @@
public char[] computeUniqueKey() {
return LambdaExpression.this.descriptor.declaringClass.computeUniqueKey();
}
+ @Override
public String toString() {
StringBuffer output = new StringBuffer("()->{} implements "); //$NON-NLS-1$
output.append(LambdaExpression.this.descriptor.declaringClass.sourceName());
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Literal.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Literal.java
index 18abfff..ea20e44 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Literal.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Literal.java
@@ -23,6 +23,7 @@
this.sourceEnd = e;
}
+ @Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -35,11 +36,13 @@
public abstract TypeBinding literalType(BlockScope scope);
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
return output.append(source());
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
// compute the real value, which must range its type's range
this.resolvedType = literalType(scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
index ba04771..64080db 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LocalDeclaration.java
@@ -100,6 +100,7 @@
this.declarationEnd = sourceEnd;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// record variable initialization if any
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
@@ -171,6 +172,7 @@
* Code generation for a local declaration:
* i.e. normal assignment to a local variable + unused variable handling
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
// even if not reachable, variable must be added to visible if allocated (28298)
@@ -227,6 +229,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
*/
+ @Override
public int getKind() {
return LOCAL_VARIABLE;
}
@@ -249,6 +252,7 @@
public boolean isReceiver() {
return false;
}
+ @Override
public void resolve(BlockScope scope) {
// prescan NNBD
@@ -387,6 +391,7 @@
this.binding.tagBits &= ~TagBits.AnnotationNullMASK;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java
index 87ca75c..93d724e 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteral.java
@@ -68,6 +68,7 @@
}
return this;
}
+@Override
public void computeConstant() {
char[] token = this.reducedForm != null ? this.reducedForm : this.source;
int tokenLength = token.length;
@@ -146,6 +147,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -154,9 +156,11 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.LONG;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java
index 962b874..578e5ac 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LongLiteralMinValue.java
@@ -20,6 +20,7 @@
super(token, reducedForm, start, end);
this.constant = LongConstant.fromValue(Long.MIN_VALUE);
}
+@Override
public void computeConstant() {
/*precomputed at creation time*/}
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MagicLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MagicLiteral.java
index 61a8b6f..9b2d2c8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MagicLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MagicLiteral.java
@@ -21,11 +21,13 @@
super(start,end);
}
+ @Override
public boolean isValidJavaStatement(){
return false ;
}
+ @Override
public char[] source() {
return null;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java
index 15d2b31..7615ffb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MarkerAnnotation.java
@@ -30,10 +30,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Annotation#memberValuePairs()
*/
+ @Override
public MemberValuePair[] memberValuePairs() {
return NoValuePairs;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
@@ -42,6 +44,7 @@
}
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
index 5490493..4ce69d7 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MemberValuePair.java
@@ -51,6 +51,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.ASTNode#print(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
output
.append(this.name)
@@ -92,6 +93,7 @@
valueType = this.value.resolveType(scope);
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=248897
ASTVisitor visitor = new ASTVisitor() {
+ @Override
public boolean visit(SingleNameReference reference, BlockScope scop) {
if (reference.binding instanceof LocalVariableBinding) {
((LocalVariableBinding) reference.binding).useFlag = LocalVariableBinding.USED;
@@ -251,6 +253,7 @@
}
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.value != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
index b54b238..d61d9e3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java
@@ -224,6 +224,7 @@
public boolean isGenerated = false;
// SH}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
boolean nonStatic = !this.binding.isStatic();
boolean wasInsideAssert = ((flowContext.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) != 0);
@@ -525,6 +526,7 @@
return flowInfo;
}
+@Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
// message send as a receiver
int nullStatus = nullStatus(flowInfo, flowContext); // note that flowInfo is not used inside nullStatus(..)
@@ -544,6 +546,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.jdt.internal.compiler.lookup.Scope, org.eclipse.jdt.internal.compiler.lookup.TypeBinding, org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
if (runtimeTimeType == null || compileTimeType == null)
return;
@@ -594,6 +597,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
cleanUpInferenceContexts();
int pc = codeStream.position;
@@ -703,10 +707,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
*/
+@Override
public TypeBinding[] genericTypeArguments() {
return this.genericTypeArguments;
}
+@Override
public boolean isSuperAccess() {
return this.receiver.isSuper();
}
@@ -715,6 +721,7 @@
return this.receiver.isSuper();
}
// SH}
+@Override
public boolean isTypeAccess() {
return this.receiver != null && this.receiver.isTypeReference();
}
@@ -779,6 +786,7 @@
}
// SH}
}
+@Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
if ((this.implicitConversion & TypeIds.BOXING) != 0)
return FlowInfo.NON_NULL;
@@ -797,6 +805,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
*/
+@Override
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
if (this.valueCast != null)
@@ -835,6 +844,7 @@
return convertedType;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output){
if (!this.receiver.isImplicitThis()) this.receiver.printExpression(0, output).append('.');
@@ -858,6 +868,7 @@
return output.append(')');
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
// Answer the signature return type, answers PolyTypeBinding if a poly expression and there is no target type
// Base type promotion
@@ -1554,10 +1565,12 @@
}
// SH}
+@Override
public void setActualReceiverType(ReferenceBinding receiverType) {
if (receiverType == null) return; // error scenario only
this.actualReceiverType = receiverType;
}
+@Override
public void setDepth(int depth) {
this.bits &= ~ASTNode.DepthMASK; // flush previous depth if any
if (depth > 0) {
@@ -1568,14 +1581,17 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#setExpectedType(org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public void setExpectedType(TypeBinding expectedType) {
this.expectedType = expectedType;
}
+@Override
public void setExpressionContext(ExpressionContext context) {
this.expressionContext = context;
}
+@Override
public boolean isPolyExpression() {
/* 15.12 has four requirements: 1) The invocation appears in an assignment context or an invocation context
@@ -1588,6 +1604,7 @@
return isPolyExpression(this.binding);
}
+@Override
public boolean isBoxingCompatibleWith(TypeBinding targetType, Scope scope) {
if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null)
return false;
@@ -1610,6 +1627,7 @@
}
}
+@Override
public boolean isCompatibleWith(TypeBinding targetType, final Scope scope) {
if (this.argumentsHaveErrors || this.binding == null || !this.binding.isValidBinding() || targetType == null || scope == null)
return false;
@@ -1637,6 +1655,7 @@
}
/** Variant of isPolyExpression() to be used during type inference, when a resolution candidate exists. */
+@Override
public boolean isPolyExpression(MethodBinding resolutionCandidate) {
if (this.expressionContext != ASSIGNMENT_CONTEXT && this.expressionContext != INVOCATION_CONTEXT)
return false;
@@ -1663,19 +1682,23 @@
return false;
}
+@Override
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) {
if (super.sIsMoreSpecific(s, t, scope))
return true;
return isPolyExpression() ? !s.isBaseType() && t.isBaseType() : false;
}
+@Override
public void setFieldIndex(int depth) {
// ignore for here
}
+@Override
public TypeBinding invocationTargetType() {
return this.expectedType;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.receiver.traverse(visitor, blockScope);
@@ -1692,17 +1715,21 @@
}
visitor.endVisit(this, blockScope);
}
+@Override
public boolean statementExpression() {
return ((this.bits & ASTNode.ParenthesizedMASK) == 0);
}
+@Override
public boolean receiverIsImplicitThis() {
return this.receiver.isImplicitThis();
}
// -- interface Invocation: --
+@Override
public MethodBinding binding() {
return this.binding;
}
+@Override
public void registerInferenceContext(ParameterizedGenericMethodBinding method, InferenceContext18 infCtx18) {
if (this.inferenceContexts == null)
this.inferenceContexts = new SimpleLookupTable();
@@ -1716,6 +1743,7 @@
this.solutionsPerTargetType.put(targetType, method);
}
+@Override
public InferenceContext18 getInferenceContext(ParameterizedMethodBinding method) {
if (this.inferenceContexts == null)
return null;
@@ -1732,13 +1760,16 @@
this.outerInferenceContext = null;
this.solutionsPerTargetType = null;
}
+@Override
public Expression[] arguments() {
return this.arguments;
}
+@Override
public ExpressionContext getExpressionContext() {
return this.expressionContext;
}
// -- Interface InvocationSite: --
+@Override
public InferenceContext18 freshInferenceContext(Scope scope) {
return new InferenceContext18(scope, this.arguments, this, this.outerInferenceContext);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
index d7c5ca9..498927f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MethodDeclaration.java
@@ -235,6 +235,7 @@
}
// SH}
+ @Override
public void getAllAnnotationContexts(int targetType, List allAnnotationContexts) {
AnnotationCollector collector = new AnnotationCollector(this.returnType, targetType, allAnnotationContexts);
for (int i = 0, max = this.annotations.length; i < max; i++) {
@@ -249,24 +250,29 @@
(this.returnType != null && this.returnType.hasNullTypeAnnotation(position)); // just in case
}
+ @Override
public boolean isDefaultMethod() {
return (this.modifiers & ExtraCompilerModifiers.AccDefaultMethod) != 0;
}
+ @Override
public boolean isMethod() {
return true;
}
+ @Override
public void parseStatements(Parser parser, CompilationUnitDeclaration unit) {
//fill up the method body with statement
parser.parse(this, unit);
}
+ @Override
public StringBuffer printReturnType(int indent, StringBuffer output) {
if (this.returnType == null) return output;
return this.returnType.printExpression(0, output).append(' ');
}
+ @Override
public void resolveStatements() {
// ========= abort on fatal error =============
if (this.returnType != null && this.binding != null) {
@@ -420,6 +426,7 @@
protected void linkPredicates() { /* noop */ }
// SH}
+ @Override
public void traverse(
ASTVisitor visitor,
ClassScope classScope) {
@@ -459,6 +466,7 @@
}
visitor.endVisit(this, classScope);
}
+ @Override
public TypeParameter[] typeParameters() {
return this.typeParameters;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
index 6956fd1..4c5f2ba 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NameReference.java
@@ -86,40 +86,48 @@
* a chain of several fields (QualifiedNameReference with more than one field).
* Otherwise use {@link #lastFieldBinding()}.
*/
+@Override
public FieldBinding fieldBinding() {
//this method should be sent ONLY after a check against isFieldReference()
//check its use doing senders.........
return (FieldBinding) this.binding ;
}
+@Override
public FieldBinding lastFieldBinding() {
if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.FIELD)
return fieldBinding(); // most subclasses only refer to one field anyway
return null;
}
+@Override
public InferenceContext18 freshInferenceContext(Scope scope) {
return null;
}
+@Override
public boolean isSuperAccess() {
return false;
}
+@Override
public boolean isTypeAccess() {
// null is acceptable when we are resolving the first part of a reference
return this.binding == null || this.binding instanceof ReferenceBinding;
}
+@Override
public boolean isTypeReference() {
return this.binding instanceof ReferenceBinding;
}
+@Override
public void setActualReceiverType(ReferenceBinding receiverType) {
if (receiverType == null) return; // error scenario only
this.actualReceiverType = receiverType;
}
+@Override
public void setDepth(int depth) {
this.bits &= ~DepthMASK; // flush previous depth if any
if (depth > 0) {
@@ -127,6 +135,7 @@
}
}
+@Override
public void setFieldIndex(int index){
// ignored
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java
index 069822c..1324b94a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NormalAnnotation.java
@@ -26,6 +26,7 @@
this.sourceEnd = type.sourceEnd;
}
+ @Override
public ElementValuePair[] computeElementValuePairs() {
int numberOfPairs = this.memberValuePairs == null ? 0 : this.memberValuePairs.length;
if (numberOfPairs == 0)
@@ -40,9 +41,11 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Annotation#memberValuePairs()
*/
+ @Override
public MemberValuePair[] memberValuePairs() {
return this.memberValuePairs == null ? NoValuePairs : this.memberValuePairs;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
super.printExpression(indent, output);
output.append('(');
@@ -58,6 +61,7 @@
return output;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
@@ -71,6 +75,7 @@
}
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullLiteral.java
index d24a3ef..f708a59 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NullLiteral.java
@@ -28,6 +28,7 @@
super(s,e);
}
+ @Override
public void computeConstant() {
this.constant = Constant.NotAConstant;
@@ -40,6 +41,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -48,22 +50,27 @@
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.NULL;
}
+ @Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
return FlowInfo.NULL;
}
+ @Override
public Object reusableJSRTarget() {
return TypeBinding.NULL;
}
+ @Override
public char[] source() {
return source;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NumberLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NumberLiteral.java
index f73810e..f928199 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NumberLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/NumberLiteral.java
@@ -23,10 +23,12 @@
super (s,e) ;
}
+ @Override
public boolean isValidJavaStatement(){
return false ;
}
+ @Override
public char[] source(){
return this.source;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
index 7c2ea39..6dd4a78 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java
@@ -32,6 +32,7 @@
super(left, right, operator);
}
+ @Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -92,6 +93,7 @@
/**
* Code generation for a binary operation
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (this.constant != Constant.NotAConstant) {
@@ -193,6 +195,7 @@
/**
* Boolean operator code generation Optimized operations are: ||
*/
+ @Override
public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired) {
if (this.constant != Constant.NotAConstant) {
super.generateOptimizedBoolean(currentScope, codeStream, trueLabel, falseLabel, valueRequired);
@@ -271,6 +274,7 @@
}
}
+ @Override
public boolean isCompactableOperation() {
return false;
}
@@ -278,6 +282,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.BinaryExpression#resolveType(org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public TypeBinding resolveType(BlockScope scope) {
TypeBinding result = super.resolveType(scope);
// check whether comparing identical expressions
@@ -289,6 +294,7 @@
return result;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.left.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OpensStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OpensStatement.java
index 6a7546d..4c50f78 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OpensStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OpensStatement.java
@@ -20,6 +20,7 @@
public OpensStatement(ImportReference pkgRef, ModuleReference[] targets) {
super(pkgRef, targets);
}
+ @Override
protected int computeSeverity(int problemId) {
return ProblemSeverities.Warning;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java
index 6eec337..dfe604f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/OperatorExpression.java
@@ -1557,6 +1557,7 @@
return "unknown operator"; //$NON-NLS-1$
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
output.append('(');
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
index 5288f1b..348abeb 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedQualifiedTypeReference.java
@@ -84,6 +84,7 @@
this.bits |= ASTNode.HasTypeAnnotations;
}
}
+ @Override
public void checkBounds(Scope scope) {
if (this.resolvedType == null || !this.resolvedType.isValidBinding()) return;
@@ -108,6 +109,7 @@
}
}
}
+ @Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
int totalDimensions = this.dimensions() + additionalDimensions;
Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
@@ -118,6 +120,7 @@
pqtr.extendedDimensions = additionalDimensions;
return pqtr;
}
+ @Override
public boolean isParameterizedTypeReference() {
return true;
}
@@ -147,6 +150,7 @@
/**
* @return char[][]
*/
+ @Override
public char [][] getParameterizedTypeName(){
int length = this.tokens.length;
char[][] qParamName = new char[length][];
@@ -181,6 +185,7 @@
return qParamName;
}
+ @Override
public TypeReference[][] getTypeArguments() {
return this.typeArguments;
}
@@ -188,7 +193,8 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
- protected TypeBinding getTypeBinding(Scope scope) {
+ @Override
+ protected TypeBinding getTypeBinding(Scope scope) {
return null; // not supported here - combined with resolveType(...)
}
@@ -413,6 +419,7 @@
}
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
int length = this.tokens.length;
for (int i = 0; i < length - 1; i++) {
@@ -486,12 +493,15 @@
return output;
}
+ @Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
return internalResolveType(scope, checkBounds, location);
}
+ @Override
public TypeBinding resolveType(ClassScope scope, int location) {
return internalResolveType(scope, false, location);
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -523,6 +533,7 @@
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
index 28ebbe4..f8e3443 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ParameterizedSingleTypeReference.java
@@ -87,6 +87,7 @@
this.bits |= ASTNode.HasTypeAnnotations;
}
}
+ @Override
public void checkBounds(Scope scope) {
if (this.resolvedType == null) return;
@@ -99,6 +100,7 @@
}
}
+ @Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation [][] additionalAnnotations, boolean isVarargs) {
int totalDimensions = this.dimensions() + additionalDimensions;
Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
@@ -113,6 +115,7 @@
/**
* @return char[][]
*/
+ @Override
public char [][] getParameterizedTypeName(){
StringBuffer buffer = new StringBuffer(5);
buffer.append(this.token).append('<');
@@ -152,6 +155,7 @@
return new char[][]{ name };
}
+ @Override
public TypeReference[][] getTypeArguments() {
return new TypeReference[][] { this.typeArguments };
}
@@ -159,11 +163,13 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
- protected TypeBinding getTypeBinding(Scope scope) {
+ @Override
+ protected TypeBinding getTypeBinding(Scope scope) {
return null; // not supported here - combined with resolveType(...)
}
- public boolean isParameterizedTypeReference() {
+ @Override
+ public boolean isParameterizedTypeReference() {
return true;
}
@@ -494,6 +500,7 @@
return type;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
if (this.annotations != null && this.annotations[0] != null) {
printAnnotations(this.annotations[0], output);
@@ -550,14 +557,17 @@
return output;
}
+ @Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
return internalResolveType(scope, null, checkBounds, location);
}
+ @Override
public TypeBinding resolveType(ClassScope scope, int location) {
return internalResolveType(scope, null, false /*no bounds check in classScope*/, location);
}
+ @Override
public TypeBinding resolveTypeEnclosing(BlockScope scope, ReferenceBinding enclosingType) {
return internalResolveType(scope, enclosingType, true/*check bounds*/, 0);
}
@@ -632,6 +642,7 @@
return true;
}
// SH}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -659,6 +670,7 @@
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PostfixExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PostfixExpression.java
index 3bd8187..df32d2b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PostfixExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PostfixExpression.java
@@ -21,6 +21,7 @@
this.sourceStart = lhs.sourceStart;
this.sourceEnd = pos;
}
+@Override
public boolean checkCastCompatibility() {
return false;
}
@@ -31,6 +32,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
// various scenarii are possible, setting an array reference,
// a field reference, a blank final field reference, a field of an enclosing instance or
@@ -44,6 +46,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public String operatorToString() {
switch (this.operator) {
case PLUS :
@@ -54,14 +57,17 @@
return "unknown operator"; //$NON-NLS-1$
}
+@Override
public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
return this.lhs.printExpression(indent, output).append(' ').append(operatorToString());
}
+@Override
public boolean restrainUsageToNumericTypes() {
return true;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PrefixExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PrefixExpression.java
index 19ecf14..3d3bf6b 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PrefixExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/PrefixExpression.java
@@ -26,9 +26,11 @@
this.sourceStart = pos;
this.sourceEnd = lhs.sourceEnd;
}
+@Override
public boolean checkCastCompatibility() {
return false;
}
+@Override
public String operatorToString() {
switch (this.operator) {
case PLUS :
@@ -39,16 +41,19 @@
return "unknown operator"; //$NON-NLS-1$
}
+@Override
public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
output.append(operatorToString()).append(' ');
return this.lhs.printExpression(0, output);
}
+@Override
public boolean restrainUsageToNumericTypes() {
return true;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
this.lhs.traverse(visitor, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
index 3c4237e..6ae5292 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java
@@ -143,6 +143,7 @@
anonymousType.allocation = this;
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
//{ObjectTeams: dispatch:
if (this.creatorCall != null)
@@ -223,11 +224,13 @@
return flowInfo;
}
+ @Override
public Expression enclosingInstance() {
return this.enclosingInstance;
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
//{ObjectTeams: dispatch:
if (this.preGenerateTask != null)
@@ -312,6 +315,7 @@
}
}
+ @Override
public boolean isSuperAccess() {
// necessary to lookup super constructor of anonymous type
@@ -325,6 +329,7 @@
* types, since by the time we reach them, we might not yet know their
* exact need.
*/
+ @Override
public void manageEnclosingInstanceAccessIfNecessary(BlockScope currentScope, FlowInfo flowInfo) {
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE_OR_DEAD) == 0) {
ReferenceBinding allocatedTypeErasure = (ReferenceBinding) this.binding.declaringClass.erasure();
@@ -343,6 +348,7 @@
}
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
//{ObjectTeams: dispatch
if (this.creatorCall != null)
@@ -357,6 +363,7 @@
return output;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
//{ObjectTeams: special casing
if (this.anonymousType == null && this.creatorCall == null && this.enclosingInstance == null) // special case during code assist
@@ -391,7 +398,8 @@
{
@Override public int problemId() { return IProblem.AnchorNotFinal; }
};
- this.preGenerateTask = new Runnable() { public void run() {
+ this.preGenerateTask = new Runnable() { @Override
+ public void run() {
// need to transfer this info from the real local to the fake one (don't have that info yet):
((LocalVariableBinding)anchorRef.binding).resolvedPosition = localOrig.resolvedPosition;
}};
@@ -852,11 +860,13 @@
this.noErrors = true;
}
+ @Override
public boolean visit(IntersectionTypeBinding18 intersectionTypeBinding18) {
Arrays.sort(intersectionTypeBinding18.intersectingTypes, (t1, t2) -> t1.id - t2.id);
scope.problemReporter().anonymousDiamondWithNonDenotableTypeArguments(QualifiedAllocationExpression.this.type, allocationType);
return this.noErrors = false; // stop traversal
}
+ @Override
public boolean visit(TypeVariableBinding typeVariable) {
if (typeVariable.isCapture()) {
scope.problemReporter().anonymousDiamondWithNonDenotableTypeArguments(QualifiedAllocationExpression.this.type, allocationType);
@@ -864,6 +874,7 @@
}
return true; // continue traversal
}
+ @Override
public boolean visit(ReferenceBinding ref) {
if (!ref.canBeSeenBy(scope)) {
scope.problemReporter().invalidType(QualifiedAllocationExpression.this.anonymousType, new ProblemReferenceBinding(ref.compoundName, ref, ProblemReasons.NotVisible));
@@ -895,6 +906,7 @@
//{ObjectTeams: FIXME: use anchorMapping?? SH}
return findConstructorBinding(scope, this, anonymousSuperclass, this.argumentTypes);
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
//{ObjectTeams: creator?
if (this.creatorCall != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
index d06692f..f2167e1 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedNameReference.java
@@ -115,6 +115,7 @@
this.sourceEnd = sourceEnd;
}
+@Override
public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
// determine the rank until which we now we do not need any actual value for the field access
int otherBindingsCount = this.otherBindings == null ? 0 : this.otherBindings.length;
@@ -217,10 +218,12 @@
return flowInfo;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return analyseCode(currentScope, flowContext, flowInfo, true);
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
// determine the rank until which we now we do not need any actual value for the field access
int otherBindingsCount = this.otherBindings == null ? 0 : this.otherBindings.length;
@@ -302,6 +305,7 @@
}
}
+@Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
if (super.checkNPE(scope, flowContext, flowInfo, ttlForFieldCheck)) {
return true;
@@ -326,6 +330,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.jdt.internal.compiler.lookup.Scope, org.eclipse.jdt.internal.compiler.lookup.TypeBinding, org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
if (runtimeTimeType == null || compileTimeType == null)
return;
@@ -364,6 +369,7 @@
super.computeConversion(scope, runtimeTimeType, compileTimeType);
}
+@Override
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
int pc = codeStream.position;
FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
@@ -376,6 +382,7 @@
}
}
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (this.constant != Constant.NotAConstant) {
@@ -458,6 +465,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
// check if compound assignment is the only usage of a private field
@@ -511,6 +519,7 @@
// equivalent to valuesRequired[maxOtherBindings]
}
+@Override
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
FieldBinding lastFieldBinding = generateReadSequence(currentScope, codeStream);
// check if this post increment is the only usage of a private field
@@ -720,6 +729,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
*/
+@Override
public TypeBinding[] genericTypeArguments() {
return null;
}
@@ -887,6 +897,7 @@
final BlockScope theScope = scope;
type = RoleTypeCreator.deepSubstitute(type, scope.environment(),
new IDependentTypeSubstitution() {
+ @Override
public TypeBinding substitute(DependentTypeBinding original, TypeBinding[] typeArguments, int dimensions) {
if (((ReferenceBinding)original).isRole()) {
ITeamAnchor anchor = null;
@@ -948,6 +959,7 @@
}
// SH}
+@Override
public boolean isEquivalent(Reference reference) {
if (reference instanceof FieldReference) {
return reference.isEquivalent(this); // comparison FR <-> QNR is implemented only once
@@ -977,6 +989,7 @@
return (this.bits & ASTNode.RestrictiveFlagMASK) == Binding.FIELD;
}
+@Override
public FieldBinding lastFieldBinding() {
if (this.otherBindings != null) {
return this.otherBindings[this.otherBindings.length - 1];
@@ -1089,6 +1102,7 @@
}
}
+@Override
public Constant optimizedBooleanConstant() {
switch (this.resolvedType.id) {
case T_boolean :
@@ -1109,6 +1123,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
*/
+@Override
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
TypeBinding requiredGenericCast = getGenericCast(this.otherBindings == null ? 0 : this.otherBindings.length);
@@ -1148,6 +1163,7 @@
return convertedType;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
for (int i = 0; i < this.tokens.length; i++) {
if (i > 0) output.append('.');
@@ -1175,6 +1191,7 @@
return null;
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
//{ObjectTeams: already resolved?
if (this.binding != null && this.resolvedType != null) {
@@ -1334,6 +1351,7 @@
}
// SH}
+@Override
public void setFieldIndex(int index) {
this.indexOfFirstFieldBinding = index;
}
@@ -1363,24 +1381,29 @@
}
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+@Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+@Override
public String unboundReferenceErrorName() {
return new String(this.tokens[0]);
}
+@Override
public char[][] getName() {
return this.tokens;
}
+@Override
public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations) {
if (this.binding != null && isFieldAccess()) {
FieldBinding fieldBinding;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
index 67c9f2a..62a77f8 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedSuperReference.java
@@ -30,22 +30,27 @@
super(name, pos, sourceEnd);
}
+@Override
public boolean isSuper() {
return true;
}
+@Override
public boolean isQualifiedSuper() {
return true;
}
+@Override
public boolean isThis() {
return false;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return this.qualification.print(0, output).append(".super"); //$NON-NLS-1$
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
if ((this.bits & ParenthesizedMASK) != 0) {
scope.problemReporter().invalidParenthesizedExpression(this);
@@ -68,6 +73,7 @@
: this.currentCompatibleType.superclass());
}
+@Override
int findCompatibleEnclosing(ReferenceBinding enclosingType, TypeBinding type, BlockScope scope) {
if (type.isInterface()) {
// super call to an overridden default method? (not considering outer enclosings)
@@ -103,6 +109,7 @@
return super.findCompatibleEnclosing(enclosingType, type, scope);
}
+@Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
@@ -112,6 +119,7 @@
}
visitor.endVisit(this, blockScope);
}
+@Override
public void traverse(
ASTVisitor visitor,
ClassScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
index 6b001fb..cd2c1cf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedThisReference.java
@@ -56,6 +56,7 @@
this.sourceStart = name.sourceStart;
}
+ @Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -64,6 +65,7 @@
return flowInfo;
}
+ @Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -80,6 +82,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+ @Override
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
@@ -99,6 +102,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
@@ -180,11 +184,13 @@
return depth;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
return this.qualification.print(0, output).append(".this"); //$NON-NLS-1$
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
@@ -195,6 +201,7 @@
visitor.endVisit(this, blockScope);
}
+ @Override
public void traverse(
ASTVisitor visitor,
ClassScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
index 9e96ebd..5330d8c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedTypeReference.java
@@ -45,6 +45,7 @@
this.sourceEnd = (int)(this.sourcePositions[this.sourcePositions.length-1] & 0x00000000FFFFFFFFL ) ;
}
+ @Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
int totalDimensions = this.dimensions() + additionalDimensions;
Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
@@ -61,6 +62,7 @@
* Try to resolve this type reference as an anchored type "t.R".
* @param scope
*/
+ @Override
TypeBinding resolveAnchoredType(Scope scope) {
if (this.tokens.length >= 2) {
TypeBinding anchoredType = RoleTypeCreator.resolveAnchoredType(
@@ -116,6 +118,7 @@
}
}
+ @Override
public char[] getLastToken() {
return this.tokens[this.tokens.length-1];
}
@@ -149,6 +152,7 @@
}
}
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
if (this.resolvedType != null) {
@@ -271,11 +275,13 @@
}
}
+ @Override
public char[][] getTypeName(){
return this.tokens;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
for (int i = 0; i < this.tokens.length; i++) {
if (i > 0) output.append('.');
@@ -293,6 +299,7 @@
return output;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -307,6 +314,7 @@
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -320,6 +328,7 @@
}
visitor.endVisit(this, scope);
}
+ @Override
public int getAnnotatableLevels() {
return this.tokens.length;
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
index 040c8ed..431abdf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Receiver.java
@@ -17,10 +17,12 @@
super(name, posNom, typeReference, modifiers);
this.qualifyingName = qualifyingName;
}
+ @Override
public boolean isReceiver() {
return true;
}
+ @Override
public StringBuffer print(int indent, StringBuffer output) {
printIndent(indent, output);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
index a80776c..73bc3ad 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Reference.java
@@ -64,10 +64,12 @@
}
public abstract FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound);
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return flowInfo;
}
+@Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
if (flowContext.isNullcheckedFieldAccess(this)) {
return true; // enough seen
@@ -165,6 +167,7 @@
return null;
}
+@Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
if ((this.implicitConversion & TypeIds.BOXING) != 0)
return FlowInfo.NON_NULL;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
index 2cb7c85..749cb99 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReferenceExpression.java
@@ -161,6 +161,7 @@
return new ASTVisitor() {
boolean accessesnonFinalOuterLocals;
+ @Override
public boolean visit(SingleNameReference name, BlockScope skope) {
Binding local = skope.getBinding(name.getName(), ReferenceExpression.this);
if (local instanceof LocalVariableBinding) {
@@ -304,6 +305,7 @@
}
return true;
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
this.actualMethodBinding = this.binding; // grab before synthetics come into play.
// Handle some special cases up front and transform them into implicit lambdas.
@@ -396,6 +398,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public void cleanUp() {
// no more rescanning needed beyond this point, so free the memory:
if (this.copiesPerTargetType != null) {
@@ -464,6 +467,7 @@
}
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// static methods with receiver value never get here
if (this.haveReceiver) {
@@ -524,6 +528,7 @@
this.potentialMethods = methods;
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
final CompilerOptions compilerOptions = scope.compilerOptions();
@@ -947,6 +952,7 @@
return this.inferenceContexts.get(method);
}
+ @Override
public ReferenceExpression resolveExpressionExpecting(TypeBinding targetType, Scope scope, InferenceContext18 inferenceContext) {
if (this.exactMethodBinding != null) { // We may see inference variables in target type.
MethodBinding functionType = targetType.getSingleAbstractMethod(scope, true);
@@ -969,6 +975,7 @@
return CharOperation.equals(this.selector, ConstantPool.Init);
}
+ @Override
public boolean isExactMethodReference() {
return this.exactMethodBinding != null;
}
@@ -981,6 +988,7 @@
return !CharOperation.equals(this.selector, ConstantPool.Init);
}
+ @Override
public boolean isPertinentToApplicability(TypeBinding targetType, MethodBinding method) {
if (!this.isExactMethodReference()) {
return false;
@@ -988,10 +996,12 @@
return super.isPertinentToApplicability(targetType, method);
}
+ @Override
public TypeBinding[] genericTypeArguments() {
return this.resolvedTypeArguments;
}
+ @Override
public InferenceContext18 freshInferenceContext(Scope scope) {
if (this.expressionContext != ExpressionContext.VANILLA_CONTEXT) {
Expression[] arguments = createPseudoExpressions(this.freeParameters);
@@ -1000,26 +1010,32 @@
return null; // shouldn't happen, actually
}
+ @Override
public boolean isSuperAccess() {
return this.lhs.isSuper();
}
+ @Override
public boolean isTypeAccess() {
return !this.haveReceiver;
}
+ @Override
public void setActualReceiverType(ReferenceBinding receiverType) {
return;
}
+ @Override
public void setDepth(int depth) {
this.depth = depth;
}
+ @Override
public void setFieldIndex(int depth) {
return;
}
+ @Override
public StringBuffer printExpression(int tab, StringBuffer output) {
this.lhs.print(0, output);
@@ -1042,6 +1058,7 @@
return output;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
@@ -1101,12 +1118,15 @@
{
this.compoundName = CharOperation.NO_CHAR_CHAR;
}
+ @Override
public boolean isCompatibleWith(TypeBinding otherType, Scope captureScope) {
return true;
}
+ @Override
public TypeBinding findSuperTypeOriginatingFrom(TypeBinding otherType) {
return otherType;
}
+ @Override
public String toString() {
return "(wildcard)"; //$NON-NLS-1$
}
@@ -1183,11 +1203,13 @@
return scope.getMethod(this.receiverType, this.selector, parameters, this);
}
+ @Override
public boolean isCompatibleWith(TypeBinding targetType, Scope scope) {
ReferenceExpression copy = cachedResolvedCopy(targetType);
return copy != null && copy.resolvedType != null && copy.resolvedType.isValidBinding() && copy.binding != null && copy.binding.isValidBinding();
}
+ @Override
public boolean sIsMoreSpecific(TypeBinding s, TypeBinding t, Scope scope) {
if (super.sIsMoreSpecific(s, t, scope))
@@ -1227,6 +1249,7 @@
return r1.isBaseType() != r2.isBaseType() && r1.isBaseType() == this.exactMethodBinding.returnType.isBaseType();
}
+ @Override
public org.eclipse.jdt.internal.compiler.lookup.MethodBinding getMethodBinding() {
if (this.actualMethodBinding == null) // array new/clone, no real binding.
this.actualMethodBinding = this.binding;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
index 250a0ef..dfe1a73 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ReturnStatement.java
@@ -80,6 +80,7 @@
this.implicitReturn = implicitReturn;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // here requires to generate a sequence of finally blocks invocations depending corresponding
// to each of the traversed try statements, so that execution will terminate properly.
@@ -223,6 +224,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -302,6 +304,7 @@
this.saveValueVariable = targetTryStatement.secretReturnValue;
}
+@Override
public StringBuffer printStatement(int tab, StringBuffer output){
printIndent(tab, output).append("return "); //$NON-NLS-1$
if (this.expression != null )
@@ -309,6 +312,7 @@
return output.append(';');
}
+@Override
public void resolve(BlockScope scope) {
MethodScope methodScope = scope.methodScope();
MethodBinding methodBinding;
@@ -410,6 +414,7 @@
}
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.expression != null)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
index cc6c43b..bb25343 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleMemberAnnotation.java
@@ -33,6 +33,7 @@
// for subclasses.
}
+ @Override
public ElementValuePair[] computeElementValuePairs() {
return new ElementValuePair[] {memberValuePairs()[0].compilerElementPair};
}
@@ -40,6 +41,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Annotation#memberValuePairs()
*/
+ @Override
public MemberValuePair[] memberValuePairs() {
if (this.singlePairs == null) {
this.singlePairs =
@@ -50,6 +52,7 @@
return this.singlePairs;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
super.printExpression(indent, output);
output.append('(');
@@ -57,6 +60,7 @@
return output.append(')');
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
@@ -69,6 +73,7 @@
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.type != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
index 20385ce..cf22169 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleNameReference.java
@@ -90,6 +90,7 @@
this.sourceEnd = (int) pos;
}
+@Override
public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
boolean isReachable = (flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0;
// compound assignment extra work
@@ -194,10 +195,12 @@
return flowInfo;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return analyseCode(currentScope, flowContext, flowInfo, true);
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, boolean valueRequired) {
switch (this.bits & ASTNode.RestrictiveFlagMASK) {
case Binding.FIELD : // reading a field
@@ -281,6 +284,7 @@
}
+@Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
if (!super.checkNPE(scope, flowContext, flowInfo, ttlForFieldCheck)) {
CompilerOptions compilerOptions = scope.compilerOptions();
@@ -296,6 +300,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#computeConversion(org.eclipse.jdt.internal.compiler.lookup.Scope, org.eclipse.jdt.internal.compiler.lookup.TypeBinding, org.eclipse.jdt.internal.compiler.lookup.TypeBinding)
*/
+@Override
public void computeConversion(Scope scope, TypeBinding runtimeTimeType, TypeBinding compileTimeType) {
if (runtimeTimeType == null || compileTimeType == null)
return;
@@ -331,6 +336,7 @@
super.computeConversion(scope, runtimeTimeType, compileTimeType);
}
+@Override
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
// optimizing assignment like: i = i + 1 or i = 1 + i
if (assignment.expression.isCompactableOperation()) {
@@ -432,6 +438,7 @@
}
}
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (this.constant != Constant.NotAConstant) {
@@ -558,6 +565,7 @@
* The APIs with an extra argument is used whenever there are two references to the same variable which
* are optimized in one access: e.g "a = a + 1" optimized into "a++".
*/
+@Override
public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=185682
switch (this.bits & ASTNode.RestrictiveFlagMASK) {
@@ -736,6 +744,7 @@
}
}
+@Override
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
switch (this.bits & ASTNode.RestrictiveFlagMASK) {
case Binding.FIELD : // assigning to a field
@@ -857,10 +866,12 @@
/**
* @see org.eclipse.jdt.internal.compiler.lookup.InvocationSite#genericTypeArguments()
*/
+@Override
public TypeBinding[] genericTypeArguments() {
return null;
}
+@Override
public boolean isEquivalent(Reference reference) {
char[] otherToken = null;
if (reference instanceof SingleNameReference) {
@@ -878,6 +889,7 @@
* Returns the local variable referenced by this node. Can be a direct reference (SingleNameReference)
* or thru a cast expression etc...
*/
+@Override
public LocalVariableBinding localVariableBinding() {
switch (this.bits & ASTNode.RestrictiveFlagMASK) {
case Binding.FIELD : // reading a field
@@ -888,6 +900,7 @@
return null;
}
+@Override
public VariableBinding nullAnnotatedVariableBinding(boolean supportTypeAnnotations) {
switch (this.bits & ASTNode.RestrictiveFlagMASK) {
case Binding.FIELD : // reading a field
@@ -899,6 +912,7 @@
return null;
}
+@Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
if ((this.implicitConversion & TypeIds.BOXING) != 0)
return FlowInfo.NON_NULL;
@@ -978,6 +992,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.Expression#postConversionType(Scope)
*/
+@Override
public TypeBinding postConversionType(Scope scope) {
TypeBinding convertedType = this.resolvedType;
if (this.genericCast != null)
@@ -1016,6 +1031,7 @@
return convertedType;
}
+@Override
public StringBuffer printExpression(int indent, StringBuffer output){
return output.append(this.token);
}
@@ -1032,6 +1048,7 @@
return null;
}
+@Override
public TypeBinding resolveType(BlockScope scope) {
//{ObjectTeams: no double resolve (parameter mappings for multiple base methods may share the same AST!)
if (this.binding != null && this.resolvedType != null)
@@ -1124,20 +1141,24 @@
return this.resolvedType = reportError(scope);
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+@Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
}
+@Override
public String unboundReferenceErrorName(){
return new String(this.token);
}
+@Override
public char[][] getName() {
return new char[][] {this.token};
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
index a0386ff..2f0ed56 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SingleTypeReference.java
@@ -40,6 +40,7 @@
}
+ @Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
int totalDimensions = this.dimensions() + additionalDimensions;
Annotation [][] allAnnotations = getMergedAnnotationsOnDimensions(additionalDimensions, additionalAnnotations);
@@ -51,9 +52,11 @@
return arrayTypeReference;
}
+ @Override
public char[] getLastToken() {
return this.token;
}
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
if (this.resolvedType != null)
return this.resolvedType;
@@ -79,6 +82,7 @@
return this.resolvedType;
}
+ @Override
public char [][] getTypeName() {
return new char[][] { this.token };
}
@@ -97,6 +101,7 @@
this.token == VOID;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
if (this.annotations != null && this.annotations[0] != null) {
printAnnotations(this.annotations[0], output);
@@ -176,6 +181,7 @@
}
// SH}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
@@ -187,6 +193,7 @@
visitor.endVisit(this, scope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
index 60b9e56..cbe5f0a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Statement.java
@@ -248,15 +248,24 @@
return new ASTVisitor() {
boolean breaksOut;
+ @Override
public boolean visit(TypeDeclaration type, BlockScope skope) { return label != null; }
+ @Override
public boolean visit(TypeDeclaration type, ClassScope skope) { return label != null; }
+ @Override
public boolean visit(LambdaExpression lambda, BlockScope skope) { return label != null;}
+ @Override
public boolean visit(WhileStatement whileStatement, BlockScope skope) { return label != null; }
+ @Override
public boolean visit(DoStatement doStatement, BlockScope skope) { return label != null; }
+ @Override
public boolean visit(ForeachStatement foreachStatement, BlockScope skope) { return label != null; }
+ @Override
public boolean visit(ForStatement forStatement, BlockScope skope) { return label != null; }
+ @Override
public boolean visit(SwitchStatement switchStatement, BlockScope skope) { return label != null; }
+ @Override
public boolean visit(BreakStatement breakStatement, BlockScope skope) {
if (label == null || CharOperation.equals(label, breakStatement.label))
this.breaksOut = true;
@@ -277,6 +286,7 @@
public boolean continuesAtOuterLabel() {
return new ASTVisitor() {
boolean continuesToLabel;
+ @Override
public boolean visit(ContinueStatement continueStatement, BlockScope skope) {
if (continueStatement.label != null)
this.continuesToLabel = true;
@@ -445,6 +455,7 @@
return true;
}
+@Override
public StringBuffer print(int indent, StringBuffer output) {
return printStatement(indent, output);
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteral.java
index ebf451a..69a882f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteral.java
@@ -34,6 +34,7 @@
super(s,e);
}
+ @Override
public void computeConstant() {
this.constant = StringConstant.fromValue(String.valueOf(this.source));
@@ -60,6 +61,7 @@
/**
* Code generation for string literal
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
@@ -68,11 +70,13 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public TypeBinding literalType(BlockScope scope) {
return scope.getJavaLangString();
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
// handle some special char.....
@@ -84,11 +88,13 @@
return output;
}
+ @Override
public char[] source() {
return this.source;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
visitor.visit(this, scope);
visitor.endVisit(this, scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteralConcatenation.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteralConcatenation.java
index 4f393f0..60ebe3a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteralConcatenation.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/StringLiteralConcatenation.java
@@ -35,6 +35,7 @@
/**
* Add the lit source to mine, just as if it was mine
*/
+ @Override
public StringLiteralConcatenation extendsWith(StringLiteral lit) {
this.sourceEnd = lit.sourceEnd;
final int literalsLength = this.literals.length;
@@ -55,6 +56,7 @@
return this;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
output.append("StringLiteralConcatenation{"); //$NON-NLS-1$
for (int i = 0, max = this.counter; i < max; i++) {
@@ -64,10 +66,12 @@
return output.append('}');
}
+ @Override
public char[] source() {
return this.source;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
for (int i = 0, max = this.counter; i < max; i++) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
index 32b1dbc..20e669a 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SuperReference.java
@@ -30,11 +30,13 @@
return new ExplicitConstructorCall(ExplicitConstructorCall.ImplicitSuper);
}
+ @Override
public boolean isImplicitThis() {
return false;
}
+ @Override
public boolean isSuper() {
return true;
@@ -45,17 +47,20 @@
return true;
}
+ @Override
public boolean isThis() {
return false ;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
return output.append("super"); //$NON-NLS-1$
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
@@ -69,6 +74,7 @@
return this.resolvedType = enclosingReceiverType.superclass();
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
visitor.visit(this, blockScope);
visitor.endVisit(this, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
index 48850af..731e801 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchStatement.java
@@ -73,6 +73,7 @@
int duplicateCaseStatementsCounter = 0;
private LocalVariableBinding dispatchStringCopy = null;
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
try {
flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo);
@@ -178,6 +179,7 @@
this.string = string;
this.label = label;
}
+ @Override
public int compareTo(Object o) {
StringSwitchCase that = (StringSwitchCase) o;
if (this.hashCode == that.hashCode) {
@@ -188,6 +190,7 @@
}
return -1;
}
+ @Override
public String toString() {
return "StringSwitchCase :\n" + //$NON-NLS-1$
"case " + this.hashCode + ":(" + this.string + ")\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -319,6 +322,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if (this.expression.resolvedType.id == TypeIds.T_JavaLangString) {
generateCodeForStringSwitch(currentScope, codeStream);
@@ -442,6 +446,7 @@
}
}
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output).append("switch ("); //$NON-NLS-1$
@@ -460,6 +465,7 @@
return printIndent(indent, output).append('}');
}
+ @Override
public void resolve(BlockScope upperScope) {
try {
boolean isEnumSwitch = false;
@@ -613,6 +619,7 @@
}
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
@@ -631,6 +638,7 @@
/**
* Dispatch the call on its last statement.
*/
+ @Override
public void branchChainTo(BranchLabel label) {
// in order to improve debug attributes for stepping (11431)
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java
index 61d86d6..090a125 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SynchronizedStatement.java
@@ -42,6 +42,7 @@
this.sourceStart = s;
}
+@Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -72,6 +73,7 @@
return flowInfo;
}
+@Override
public boolean isSubRoutineEscaping() {
return false;
}
@@ -82,6 +84,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
return;
@@ -160,6 +163,7 @@
/**
* @see SubRoutineStatement#generateSubRoutineInvocation(BlockScope, CodeStream, Object, int, LocalVariableBinding)
*/
+@Override
public boolean generateSubRoutineInvocation(BlockScope currentScope, CodeStream codeStream, Object targetLocation, int stateIndex, LocalVariableBinding secretLocal) {
codeStream.load(this.synchroVariable);
codeStream.monitorexit();
@@ -167,6 +171,7 @@
return false;
}
+@Override
public void resolve(BlockScope upperScope) {
// special scope for secret locals optimization.
this.scope = new BlockScope(upperScope);
@@ -199,6 +204,7 @@
this.block.resolveUsing(this.scope);
}
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output);
output.append("synchronized ("); //$NON-NLS-1$
@@ -207,6 +213,7 @@
return this.block.printStatement(indent + 1, output);
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
this.expression.traverse(visitor, this.scope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
index 76c8021..bb2fd89 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThisReference.java
@@ -48,6 +48,7 @@
/*
* @see Reference#analyseAssignment(...)
*/
+ @Override
public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
return flowInfo; // this cannot be assigned
@@ -78,6 +79,7 @@
return true;
}
+ @Override
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) {
return true; // never problematic
}
@@ -85,11 +87,13 @@
/*
* @see Reference#generateAssignment(...)
*/
+ @Override
public void generateAssignment(BlockScope currentScope, CodeStream codeStream, Assignment assignment, boolean valueRequired) {
// this cannot be assigned
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
@@ -101,6 +105,7 @@
/*
* @see Reference#generateCompoundAssignment(...)
*/
+ @Override
public void generateCompoundAssignment(BlockScope currentScope, CodeStream codeStream, Expression expression, int operator, int assignmentImplicitConversion, boolean valueRequired) {
// this cannot be assigned
@@ -109,31 +114,37 @@
/*
* @see org.eclipse.jdt.internal.compiler.ast.Reference#generatePostIncrement()
*/
+ @Override
public void generatePostIncrement(BlockScope currentScope, CodeStream codeStream, CompoundAssignment postIncrement, boolean valueRequired) {
// this cannot be assigned
}
+ @Override
public boolean isImplicitThis() {
return (this.bits & IsImplicitThis) != 0;
}
+ @Override
public boolean isThis() {
return true ;
}
+ @Override
public int nullStatus(FlowInfo flowInfo, FlowContext flowContext) {
return FlowInfo.NON_NULL;
}
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output){
if (isImplicitThis()) return output;
return output.append("this"); //$NON-NLS-1$
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
this.constant = Constant.NotAConstant;
@@ -160,11 +171,13 @@
return this.resolvedType;
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
visitor.visit(this, blockScope);
visitor.endVisit(this, blockScope);
}
+ @Override
public void traverse(ASTVisitor visitor, ClassScope blockScope) {
visitor.visit(this, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java
index b42ca51..fd57adf 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ThrowStatement.java
@@ -46,6 +46,7 @@
this.sourceEnd = sourceEnd;
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
this.exception.analyseCode(currentScope, flowContext, flowInfo);
this.exception.checkNPE(currentScope, flowContext, flowInfo);
@@ -62,6 +63,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0)
return;
@@ -71,12 +73,14 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
printIndent(indent, output).append("throw "); //$NON-NLS-1$
this.exception.printExpression(0, output);
return output.append(';');
}
+@Override
public void resolve(BlockScope scope) {
this.exceptionType = this.exception.resolveType(scope);
if (this.exceptionType != null && this.exceptionType.isValidBinding()) {
@@ -116,6 +120,7 @@
}
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope))
this.exception.traverse(visitor, blockScope);
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java
index c754a61..d8f0684 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TrueLiteral.java
@@ -24,6 +24,7 @@
public TrueLiteral(int s , int e) {
super(s,e);
}
+@Override
public void computeConstant() {
this.constant = BooleanConstant.fromValue(true);
}
@@ -34,6 +35,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
int pc = codeStream.position;
if (valueRequired) {
@@ -41,6 +43,7 @@
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public void generateOptimizedBoolean(BlockScope currentScope, CodeStream codeStream, BranchLabel trueLabel, BranchLabel falseLabel, boolean valueRequired) {
// trueLabel being not nil means that we will not fall through into the TRUE case
@@ -57,15 +60,18 @@
}
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+@Override
public TypeBinding literalType(BlockScope scope) {
return TypeBinding.BOOLEAN;
}
/**
*
*/
+@Override
public char[] source() {
return source;
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
//{ObjectTeams: hide synthetic nodes from visitors (e.g., inserted into a base call)
if (this.isGenerated) return;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
index 5875493..fd39c84 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java
@@ -99,6 +99,7 @@
private ExceptionLabel[] resourceExceptionLabels;
private int[] caughtExceptionsCatchBlocks;
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
// Consider the try block and catch block so as to compute the intersection of initializations and
@@ -465,24 +466,28 @@
return false;
}
+@Override
public ExceptionLabel enterAnyExceptionHandler(CodeStream codeStream) {
if (this.subRoutineStartLabel == null)
return null;
return super.enterAnyExceptionHandler(codeStream);
}
+@Override
public void enterDeclaredExceptionHandlers(CodeStream codeStream) {
for (int i = 0, length = this.declaredExceptionLabels == null ? 0 : this.declaredExceptionLabels.length; i < length; i++) {
this.declaredExceptionLabels[i].placeStart();
}
}
+@Override
public void exitAnyExceptionHandler() {
if (this.subRoutineStartLabel == null)
return;
super.exitAnyExceptionHandler();
}
+@Override
public void exitDeclaredExceptionHandlers(CodeStream codeStream) {
for (int i = 0, length = this.declaredExceptionLabels == null ? 0 : this.declaredExceptionLabels.length; i < length; i++) {
this.declaredExceptionLabels[i].placeEnd();
@@ -505,6 +510,7 @@
* post 1.5 target level, cannot use jsr bytecode, must instead inline finally block
* returnAddress is only allocated if jsr is allowed
*/
+@Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -956,6 +962,7 @@
/**
* @see SubRoutineStatement#generateSubRoutineInvocation(BlockScope, CodeStream, Object, int, LocalVariableBinding)
*/
+@Override
public boolean generateSubRoutineInvocation(BlockScope currentScope, CodeStream codeStream, Object targetLocation, int stateIndex, LocalVariableBinding secretLocal) {
int resourceCount = this.resources.length;
@@ -1051,10 +1058,12 @@
}
return false;
}
+@Override
public boolean isSubRoutineEscaping() {
return (this.bits & ASTNode.IsSubRoutineEscaping) != 0;
}
+@Override
public StringBuffer printStatement(int indent, StringBuffer output) {
int length = this.resources.length;
printIndent(indent, output).append("try" + (length == 0 ? "\n" : " (")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -1092,6 +1101,7 @@
return output;
}
+@Override
public void resolve(BlockScope upperScope) {
// special scope for secret locals optimization.
this.scope = new BlockScope(upperScope);
@@ -1237,6 +1247,7 @@
this.scope.addSubscope(finallyScope);
}
}
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
if (visitor.visit(this, blockScope)) {
Statement[] statements = this.resources;
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
index ec674d9..96d2721 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java
@@ -410,6 +410,7 @@
/*
* We cause the compilation task to abort to a given extent.
*/
+@Override
public void abort(int abortLevel, CategorizedProblem problem) {
//{ObjectTeams: also mark in the state that we're done:
if (!this.willCatchAbort) { // only on exceptions that will actually fly
@@ -545,6 +546,7 @@
* Flow analysis for a local innertype
*
*/
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
if (this.ignoreFurtherInvestigation)
return flowInfo;
@@ -669,6 +671,7 @@
return hasConstructor;
}
+@Override
public CompilationResult compilationResult() {
return this.compilationResult;
}
@@ -903,6 +906,7 @@
return null;
}
+@Override
public CompilationUnitDeclaration getCompilationUnitDeclaration() {
if (this.scope != null) {
return this.scope.compilationUnitScope().referenceContext;
@@ -1082,21 +1086,25 @@
private void markMissingBytecode() {
// descend into all methods and nested types (members and local types)
traverse(new ASTVisitor() {
- public boolean visit(MethodDeclaration method, ClassScope classScope) {
+ @Override
+ public boolean visit(MethodDeclaration method, ClassScope classScope) {
if (method.binding != null)
method.binding.bytecodeMissing = true;
return true;
}
- public boolean visit(ConstructorDeclaration ctor, ClassScope classScope) {
+ @Override
+ public boolean visit(ConstructorDeclaration ctor, ClassScope classScope) {
if (ctor.binding != null)
ctor.binding.bytecodeMissing = true;
return true;
}
- public boolean visit(TypeDeclaration type, ClassScope classScope) {
+ @Override
+ public boolean visit(TypeDeclaration type, ClassScope classScope) {
type.tagAsHavingErrors();
return true;
}
- public boolean visit(TypeDeclaration type, BlockScope blockScope) {
+ @Override
+ public boolean visit(TypeDeclaration type, BlockScope blockScope) {
type.tagAsHavingErrors();
return true;
}
@@ -1140,6 +1148,7 @@
/**
* Bytecode generation for a local inner type (API as a normal statement code gen)
*/
+@Override
public void generateCode(BlockScope blockScope, CodeStream codeStream) {
if ((this.bits & ASTNode.IsReachable) == 0) {
return;
@@ -1189,6 +1198,7 @@
generateCode((ClassFile) null);
}
+@Override
public boolean hasErrors() {
return this.ignoreFurtherInvestigation;
}
@@ -1557,6 +1567,7 @@
// SH}
}
+@Override
public StringBuffer print(int indent, StringBuffer output) {
if (this.javadoc != null) {
this.javadoc.print(indent, output);
@@ -1686,6 +1697,7 @@
return output;
}
+@Override
public StringBuffer printStatement(int tab, StringBuffer output) {
return print(tab, output);
}
@@ -2000,6 +2012,7 @@
/**
* Resolve a local type declaration
*/
+@Override
public void resolve(BlockScope blockScope) {
// need to build its scope first and proceed with binding's creation
@@ -2094,6 +2107,7 @@
updateMaxFieldCount();
}
+@Override
public void tagAsHavingErrors() {
//{ObjectTeams: tag class and interface part:
if (isRole() && this.roleModel != null)
@@ -2103,11 +2117,13 @@
this.ignoreFurtherInvestigation = true;
}
+@Override
public void tagAsHavingIgnoredMandatoryErrors(int problemId) {
// Nothing to do for this context;
}
//{ObjectTeams: untag class and interface part:
+@Override
public void resetErrorFlag() {
if (isRole() && this.roleModel != null)
this.roleModel.setErrorFlag(false); // both parts
@@ -2208,6 +2224,7 @@
/**
* Iteration for a local inner type
*/
+@Override
public void traverse(ASTVisitor visitor, BlockScope blockScope) {
try {
if (visitor.visit(this, blockScope)) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
index d48707e..5dd8963 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeParameter.java
@@ -52,6 +52,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.AbstractVariableDeclaration#getKind()
*/
+ @Override
public int getKind() {
return TYPE_PARAMETER;
}
@@ -130,6 +131,7 @@
}
}
+ @Override
public void resolve(BlockScope scope) {
internalResolve(scope, scope.methodScope().isStatic);
}
@@ -179,6 +181,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.AstNode#print(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printStatement(int indent, StringBuffer output) {
if (this.annotations != null) {
printAnnotations(this.annotations, output);
@@ -203,10 +206,12 @@
return output;
}
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
// nothing to do
}
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
if (this.annotations != null) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
index f95e9b4..f6cb621 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/TypeReference.java
@@ -228,19 +228,24 @@
}
return true;
}
+ @Override
public boolean visit(MarkerAnnotation annotation, BlockScope scope) {
return internalVisit(annotation);
}
+ @Override
public boolean visit(NormalAnnotation annotation, BlockScope scope) {
return internalVisit(annotation);
}
+ @Override
public boolean visit(SingleMemberAnnotation annotation, BlockScope scope) {
return internalVisit(annotation);
}
+ @Override
public boolean visit(Wildcard wildcard, BlockScope scope) {
this.currentWildcard = wildcard;
return true;
}
+ @Override
public boolean visit(Argument argument, BlockScope scope) {
if ((argument.bits & ASTNode.IsUnionType) == 0) {
return true;
@@ -254,6 +259,7 @@
}
return false;
}
+ @Override
public boolean visit(Argument argument, ClassScope scope) {
if ((argument.bits & ASTNode.IsUnionType) == 0) {
return true;
@@ -267,6 +273,7 @@
}
return false;
}
+ @Override
public boolean visit(LocalDeclaration localDeclaration, BlockScope scope) {
for (int i = 0, max = this.localVariable.initializationCount; i < max; i++) {
int startPC = this.localVariable.initializationPCs[i << 1];
@@ -277,6 +284,7 @@
}
return false;
}
+ @Override
public void endVisit(Wildcard wildcard, BlockScope scope) {
this.currentWildcard = null;
}
@@ -298,6 +306,7 @@
public int deprecationProblemId = IProblem.UsingDeprecatedType;
public boolean isGenerated;
+@Override
public boolean isGenerated() {
return this.isGenerated;
}
@@ -363,6 +372,7 @@
public void aboutToResolve(Scope scope) {
// default implementation: do nothing
}
+@Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
return flowInfo;
}
@@ -677,6 +687,7 @@
return false;
}
// SH}
+@Override
public boolean isTypeReference() {
return true;
}
@@ -747,6 +758,7 @@
return superType;
}
+@Override
public final TypeBinding resolveType(BlockScope blockScope) {
return resolveType(blockScope, true /* checkbounds if any */);
}
@@ -759,6 +771,7 @@
return internalResolveType(scope, location);
}
+@Override
public TypeBinding resolveType(ClassScope scope) {
return resolveType(scope, 0);
}
@@ -790,8 +803,10 @@
}
}
+@Override
public abstract void traverse(ASTVisitor visitor, BlockScope scope);
+@Override
public abstract void traverse(ASTVisitor visitor, ClassScope scope);
protected void resolveAnnotations(Scope scope, int location) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java
index e099594..82c42e4 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnaryExpression.java
@@ -30,6 +30,7 @@
this.bits |= operator << OperatorSHIFT; // encode operator
}
+@Override
public FlowInfo analyseCode(
BlockScope currentScope,
FlowContext flowContext,
@@ -48,6 +49,7 @@
return flowInfo;
}
+ @Override
public Constant optimizedBooleanConstant() {
return this.optimizedBooleanConstant == null
@@ -62,6 +64,7 @@
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
* @param valueRequired boolean
*/
+ @Override
public void generateCode(
BlockScope currentScope,
CodeStream codeStream,
@@ -172,6 +175,7 @@
* Boolean operator code generation
* Optimized operations are: &&, ||, <, <=, >, >=, &, |, ^
*/
+ @Override
public void generateOptimizedBoolean(
BlockScope currentScope,
CodeStream codeStream,
@@ -205,12 +209,14 @@
}
}
+ @Override
public StringBuffer printExpressionNoParenthesis(int indent, StringBuffer output) {
output.append(operatorToString()).append(' ');
return this.expression.printExpression(0, output);
}
+ @Override
public TypeBinding resolveType(BlockScope scope) {
boolean expressionIsCast;
if ((expressionIsCast = this.expression instanceof CastExpression) == true) this.expression.bits |= DisableUnnecessaryCastCheck; // will check later on
@@ -302,6 +308,7 @@
return this.resolvedType;
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
index 1cc7d8a..bcc721c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/UnionTypeReference.java
@@ -34,6 +34,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getLastToken()
*/
+ @Override
public char[] getLastToken() {
return null;
}
@@ -41,6 +42,7 @@
/**
* @see org.eclipse.jdt.internal.compiler.ast.ArrayQualifiedTypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
+ @Override
protected TypeBinding getTypeBinding(Scope scope) {
return null; // not supported here - combined with resolveType(...)
}
@@ -48,6 +50,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeBinding(org.eclipse.jdt.internal.compiler.lookup.Scope)
*/
+ @Override
public TypeBinding resolveType(BlockScope scope, boolean checkBounds, int location) {
// return the lub (least upper bound of all type binding)
int length = this.typeReferences.length;
@@ -105,6 +108,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#getTypeName()
*/
+ @Override
public char[][] getTypeName() {
// we need to keep a return value that is a char[][]
return this.typeReferences[0].getTypeName();
@@ -113,6 +117,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.BlockScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, BlockScope scope) {
if (visitor.visit(this, scope)) {
int length = this.typeReferences == null ? 0 : this.typeReferences.length;
@@ -126,6 +131,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.TypeReference#traverse(org.eclipse.jdt.internal.compiler.ASTVisitor, org.eclipse.jdt.internal.compiler.lookup.ClassScope)
*/
+ @Override
public void traverse(ASTVisitor visitor, ClassScope scope) {
if (visitor.visit(this, scope)) {
int length = this.typeReferences == null ? 0 : this.typeReferences.length;
@@ -139,6 +145,7 @@
/* (non-Javadoc)
* @see org.eclipse.jdt.internal.compiler.ast.Expression#printExpression(int, java.lang.StringBuffer)
*/
+ @Override
public StringBuffer printExpression(int indent, StringBuffer output) {
int length = this.typeReferences == null ? 0 : this.typeReferences.length;
printIndent(indent, output);
@@ -150,9 +157,11 @@
}
return output;
}
+ @Override
public boolean isUnionType() {
return true;
}
+ @Override
public TypeReference augmentTypeWithAdditionalDimensions(int additionalDimensions, Annotation[][] additionalAnnotations, boolean isVarargs) {
return this; // arrays are not legal as union types.
}
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
index e5eeaae..b62599f 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java
@@ -42,6 +42,7 @@
this.sourceEnd = e;
}
+ @Override
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) {
this.breakLabel = new BranchLabel();
@@ -180,6 +181,7 @@
* @param currentScope org.eclipse.jdt.internal.compiler.lookup.BlockScope
* @param codeStream org.eclipse.jdt.internal.compiler.codegen.CodeStream
*/
+ @Override
public void generateCode(BlockScope currentScope, CodeStream codeStream) {
if ((this.bits & IsReachable) == 0) {
@@ -263,6 +265,7 @@
codeStream.recordPositionsFrom(pc, this.sourceStart);
}
+ @Override
public void resolve(BlockScope scope) {
TypeBinding type = this.condition.resolveTypeExpecting(scope, TypeBinding.BOOLEAN);
@@ -271,6 +274,7 @@
this.action.resolve(scope);
}
+ @Override
public StringBuffer printStatement(int tab, StringBuffer output) {
printIndent(tab, output).append("while ("); //$NON-NLS-1$
@@ -282,6 +286,7 @@
return output;
}
+ @Override
public void traverse(
ASTVisitor visitor,
BlockScope blockScope) {
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
index c9235af..bde55a3 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java
@@ -39,6 +39,7 @@
this.kind = kind;
}
+ @Override
public char [][] getParameterizedTypeName() {
switch (this.kind) {