/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Provides an implementation of Trees.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p>
*
* @author Peter von der Ahé
*/
// in a world of a single context per compilation, these would all be final
if (!(task instanceof JavacTaskImpl))
throw new IllegalArgumentException();
}
if (!(env instanceof JavacProcessingEnvironment))
throw new IllegalArgumentException();
}
return instance;
}
}
}
}
return new SourcePositions() {
}
}
};
}
}
}
return null;
return classNode;
return node;
}
return null;
}
}
if (treeTopLevel == null)
return null;
return treeTopLevel.fst;
}
}
}
}
if (treeTopLevel == null)
return null;
}
}
break;
}
}
}
}
return sym;
}
}
}
if (t instanceof JCTree.JCCompilationUnit) {
}
}
return null;
}
} else
return false;
}
if (scope instanceof JavacScope
} else
return false;
}
throw new IllegalArgumentException();
// if we're being invoked via from a JSR199 client, we need to make sure
// all the classes have been entered; if we're being invoked from JSR269,
// then the classes will already have been entered.
if (javacTaskImpl != null) {
try {
} catch (IOException e) {
throw new Error("unexpected error while entering symbols: " + e);
}
}
while (p != null) {
p = p.getParentPath();
}
case COMPILATION_UNIT:
// System.err.println("COMP: " + ((JCCompilationUnit)tree).sourcefile);
break;
case ANNOTATION_TYPE:
case CLASS:
case ENUM:
case INTERFACE:
// System.err.println("CLASS: " + ((JCClassDecl)tree).sym.getSimpleName());
break;
case METHOD:
// System.err.println("METHOD: " + ((JCMethodDecl)tree).sym.getSimpleName());
break;
case VARIABLE:
// System.err.println("FIELD: " + ((JCVariableDecl)tree).sym.getSimpleName());
break;
case BLOCK: {
// System.err.println("BLOCK: ");
return env;
}
default:
// System.err.println("DEFAULT: " + tree.getKind());
return env;
}
}
}
}
try {
} finally {
}
}
try {
} finally {
}
}
/**
* Makes a copy of a tree, noting the value resulting from copying a particular leaf.
**/
super(M);
}
if (t == leaf)
return t2;
}
}
/**
* Gets the original type from the ErrorType object.
* @param errorType The errorType for which we want to get the original type.
* @returns TypeMirror corresponding to the original type, replaced by the ErrorType.
* noType (type.tag == NONE) is returned if there is no original type.
*/
}
}
/**
* Prints a message of the specified kind at the location of the
* tree within the provided compilation unit
*
* @param kind the kind of message
* @param msg the message, or an empty string if none
* @param t the tree to use as a position hint
* @param root the compilation unit that contains tree
*/
}
try {
switch (kind) {
case ERROR:
try {
} finally {
}
break;
case WARNING:
break;
case MANDATORY_WARNING:
break;
default:
}
} finally {
}
}
} else {
return v.type;
}
}
}