--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java Fri Jun 26 12:22:40 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java Fri Jun 26 18:51:39 2009 -0700
@@ -168,6 +168,20 @@
List<JCVariableDecl> params,
List<JCExpression> thrown,
JCBlock body,
+ JCExpression defaultValue) {
+ return MethodDef(
+ mods, name, restype, typarams, params,
+ null, thrown, body, defaultValue);
+ }
+
+ public JCMethodDecl MethodDef(JCModifiers mods,
+ Name name,
+ JCExpression restype,
+ List<JCTypeParameter> typarams,
+ List<JCVariableDecl> params,
+ List<JCTypeAnnotation> receiver,
+ List<JCExpression> thrown,
+ JCBlock body,
JCExpression defaultValue)
{
JCMethodDecl tree = new JCMethodDecl(mods,
@@ -175,6 +189,7 @@
restype,
typarams,
params,
+ receiver,
thrown,
body,
defaultValue,
@@ -430,7 +445,11 @@
}
public JCTypeParameter TypeParameter(Name name, List<JCExpression> bounds) {
- JCTypeParameter tree = new JCTypeParameter(name, bounds);
+ return TypeParameter(name, bounds, List.<JCTypeAnnotation>nil());
+ }
+
+ public JCTypeParameter TypeParameter(Name name, List<JCExpression> bounds, List<JCTypeAnnotation> annos) {
+ JCTypeParameter tree = new JCTypeParameter(name, bounds, annos);
tree.pos = pos;
return tree;
}
@@ -453,6 +472,12 @@
return tree;
}
+ public JCTypeAnnotation TypeAnnotation(JCTree annotationType, List<JCExpression> args) {
+ JCTypeAnnotation tree = new JCTypeAnnotation(annotationType, args);
+ tree.pos = pos;
+ return tree;
+ }
+
public JCModifiers Modifiers(long flags, List<JCAnnotation> annotations) {
JCModifiers tree = new JCModifiers(flags, annotations);
boolean noFlags = (flags & Flags.StandardFlags) == 0;
@@ -464,6 +489,12 @@
return Modifiers(flags, List.<JCAnnotation>nil());
}
+ public JCAnnotatedType AnnotatedType(List<JCTypeAnnotation> annotations, JCExpression underlyingType) {
+ JCAnnotatedType tree = new JCAnnotatedType(annotations, underlyingType);
+ tree.pos = pos;
+ return tree;
+ }
+
public JCErroneous Erroneous() {
return Erroneous(List.<JCTree>nil());
}
@@ -772,6 +803,7 @@
Type(mtype.getReturnType()),
TypeParams(mtype.getTypeArguments()),
Params(mtype.getParameterTypes(), m),
+ null,
Types(mtype.getThrownTypes()),
body,
null,