file_name stringlengths 6 86 | file_path stringlengths 45 249 | content stringlengths 47 6.26M | file_size int64 47 6.26M | language stringclasses 1 value | extension stringclasses 1 value | repo_name stringclasses 767 values | repo_stars int64 8 14.4k | repo_forks int64 0 1.17k | repo_open_issues int64 0 788 | repo_created_at stringclasses 767 values | repo_pushed_at stringclasses 767 values |
|---|---|---|---|---|---|---|---|---|---|---|---|
InterfaceType.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/type/InterfaceType.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.type;
import com.sun.mirror.declaration.*;
/**
* Represents an interface type.
* Note that an {@linkplain AnnotationType annotation type} is
* a kind of interface.
*
* <p> While an {@link InterfaceDeclaration} represents the
* <i>declaration</i> of an interface, an <tt>InterfaceType</tt>
* represents an interface <i>type</i>.
* See {@link TypeDeclaration} for more on this distinction.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this interface is included in {@link
* javax.lang.model.type.DeclaredType}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public interface InterfaceType extends DeclaredType {
/**
* {@inheritDoc}
*/
InterfaceDeclaration getDeclaration();
}
| 2,125 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ArrayType.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/type/ArrayType.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.type;
/**
* Represents an array type.
* A multidimensional array type is represented as an array type
* whose component type is also an array type.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this interface is {@link
* javax.lang.model.type.ArrayType}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public interface ArrayType extends ReferenceType {
/**
* Returns the component type of this array type.
*
* @return the component type of this array type
*/
TypeMirror getComponentType();
}
| 1,945 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Declarations.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/Declarations.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import com.sun.mirror.declaration.*;
/**
* Utility methods for operating on declarations.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this interface is {@link
* javax.lang.model.util.Elements}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public interface Declarations {
/**
* Tests whether one type, method, or field declaration hides another.
*
* @param sub the first member
* @param sup the second member
* @return <tt>true</tt> if and only if the first member hides
* the second
*/
boolean hides(MemberDeclaration sub, MemberDeclaration sup);
/**
* Tests whether one method overrides another. When a
* non-abstract method overrides an abstract one, the
* former is also said to <i>implement</i> the latter.
*
* @param sub the first method
* @param sup the second method
* @return <tt>true</tt> if and only if the first method overrides
* the second
*/
boolean overrides(MethodDeclaration sub, MethodDeclaration sup);
}
| 2,474 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
package-info.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/package-info.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
/**
* Utilities to assist in the processing of {@linkplain
* com.sun.mirror.declaration declarations} and {@linkplain
* com.sun.mirror.type types}.
*
* <p>The {@code apt} tool and its associated API have been superseded
* by the standardized annotation processing API. The replacement for
* the functionality in this package is {@link javax.lang.model.util}.
*
* @since 1.5
*/
package com.sun.mirror.util;
| 1,625 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DeclarationVisitor.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitor.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import com.sun.mirror.declaration.*;
/**
* A visitor for declarations, in the style of the standard visitor
* design pattern. Classes implementing this interface are used to
* operate on a declaration when the kind of declaration is unknown at
* compile time. When a visitor is passed to a declaration's {@link
* Declaration#accept accept} method, the most specific
* <tt>visit<i>Xxx</i></tt> method applicable to that declaration is
* invoked.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this interface is {@link
* javax.lang.model.element.ElementVisitor}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public interface DeclarationVisitor {
/**
* Visits a declaration.
* @param d the declaration to visit
*/
public void visitDeclaration(Declaration d);
/**
* Visits a package declaration.
* @param d the declaration to visit
*/
public void visitPackageDeclaration(PackageDeclaration d);
/**
* Visits a member or constructor declaration.
* @param d the declaration to visit
*/
public void visitMemberDeclaration(MemberDeclaration d);
/**
* Visits a type declaration.
* @param d the declaration to visit
*/
public void visitTypeDeclaration(TypeDeclaration d);
/**
* Visits a class declaration.
* @param d the declaration to visit
*/
public void visitClassDeclaration(ClassDeclaration d);
/**
* Visits an enum declaration.
* @param d the declaration to visit
*/
public void visitEnumDeclaration(EnumDeclaration d);
/**
* Visits an interface declaration.
* @param d the declaration to visit
*/
public void visitInterfaceDeclaration(InterfaceDeclaration d);
/**
* Visits an annotation type declaration.
* @param d the declaration to visit
*/
public void visitAnnotationTypeDeclaration(AnnotationTypeDeclaration d);
/**
* Visits a field declaration.
* @param d the declaration to visit
*/
public void visitFieldDeclaration(FieldDeclaration d);
/**
* Visits an enum constant declaration.
* @param d the declaration to visit
*/
public void visitEnumConstantDeclaration(EnumConstantDeclaration d);
/**
* Visits a method or constructor declaration.
* @param d the declaration to visit
*/
public void visitExecutableDeclaration(ExecutableDeclaration d);
/**
* Visits a constructor declaration.
* @param d the declaration to visit
*/
public void visitConstructorDeclaration(ConstructorDeclaration d);
/**
* Visits a method declaration.
* @param d the declaration to visit
*/
public void visitMethodDeclaration(MethodDeclaration d);
/**
* Visits an annotation type element declaration.
* @param d the declaration to visit
*/
public void visitAnnotationTypeElementDeclaration(
AnnotationTypeElementDeclaration d);
/**
* Visits a parameter declaration.
* @param d the declaration to visit
*/
public void visitParameterDeclaration(ParameterDeclaration d);
/**
* Visits a type parameter declaration.
* @param d the declaration to visit
*/
public void visitTypeParameterDeclaration(TypeParameterDeclaration d);
}
| 4,757 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DeclarationVisitors.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/DeclarationVisitors.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
/**
* Utilities to create specialized <tt>DeclarationVisitor</tt> instances.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. There is no direct
* replacement for the functionality of this class in the standardized
* API due to that API's different visitor structure.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public class DeclarationVisitors {
private DeclarationVisitors(){} // do not instantiate.
/**
* A visitor that has no side effects and keeps no state.
*/
public static final DeclarationVisitor NO_OP = new SimpleDeclarationVisitor();
/**
* Return a <tt>DeclarationVisitor</tt> that will scan the
* declaration structure, visiting declarations contained in
* another declaration. For example, when visiting a class, the
* fields, methods, constructors, etc. of the class are also
* visited. The order in which the contained declarations are scanned is
* not specified.
*
* <p>The <tt>pre</tt> and <tt>post</tt>
* <tt>DeclarationVisitor</tt> parameters specify,
* respectively, the processing the scanner will do before or
* after visiting the contained declarations. If only one of pre
* and post processing is needed, use {@link
* DeclarationVisitors#NO_OP DeclarationVisitors.NO_OP} for the
* other parameter.
*
* @param pre visitor representing processing to do before
* visiting contained declarations.
*
* @param post visitor representing processing to do after
* visiting contained declarations.
*/
public static DeclarationVisitor getDeclarationScanner(DeclarationVisitor pre,
DeclarationVisitor post) {
return new DeclarationScanner(pre, post);
}
/**
* Return a <tt>DeclarationVisitor</tt> that will scan the
* declaration structure, visiting declarations contained in
* another declaration in source code order. For example, when
* visiting a class, the fields, methods, constructors, etc. of
* the class are also visited. The order in which the contained
* declarations are visited is as close to source code order as
* possible; declaration mirrors created from class files instead
* of source code will not have source position information.
*
* <p>The <tt>pre</tt> and <tt>post</tt>
* <tt>DeclarationVisitor</tt> parameters specify,
* respectively, the processing the scanner will do before or
* after visiting the contained declarations. If only one of pre
* and post processing is needed, use {@link
* DeclarationVisitors#NO_OP DeclarationVisitors.NO_OP} for the other parameter.
*
* @param pre visitor representing processing to do before
* visiting contained declarations.
*
* @param post visitor representing processing to do after
* visiting contained declarations.
*/
public static DeclarationVisitor getSourceOrderDeclarationScanner(DeclarationVisitor pre,
DeclarationVisitor post) {
return new SourceOrderDeclScanner(pre, post);
}
}
| 4,563 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SourceOrderDeclScanner.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/SourceOrderDeclScanner.java | /*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import com.sun.mirror.declaration.*;
import java.util.SortedSet;
import java.util.TreeSet;
/**
* A visitor for declarations that scans declarations contained within
* the given declaration in source code order. For example, when
* visiting a class, the methods, fields, constructors, and nested
* types of the class are also visited.
*
* To control the processing done on a declaration, users of this
* class pass in their own visitors for pre and post processing. The
* preprocessing visitor is called before the contained declarations
* are scanned; the postprocessing visitor is called after the
* contained declarations are scanned.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this class is {@link
* javax.lang.model.util.SimpleElementVisitor6}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
class SourceOrderDeclScanner extends DeclarationScanner {
static class SourceOrderComparator implements java.util.Comparator<Declaration> {
SourceOrderComparator(){}
static boolean equals(Declaration d1, Declaration d2) {
return d1 == d2 || (d1 != null && d1.equals(d2));
}
private static class DeclPartialOrder extends com.sun.mirror.util.SimpleDeclarationVisitor {
private int value = 1000;
private static int staticAdjust(Declaration d) {
return d.getModifiers().contains(Modifier.STATIC)?0:1;
}
DeclPartialOrder() {}
public int getValue() { return value; }
@Override
public void visitTypeParameterDeclaration(TypeParameterDeclaration d) {value = 0;}
@Override
public void visitEnumConstantDeclaration(EnumConstantDeclaration d) {value = 1;}
@Override
public void visitClassDeclaration(ClassDeclaration d) {value = 2 + staticAdjust(d);}
@Override
public void visitInterfaceDeclaration(InterfaceDeclaration d) {value = 4;}
@Override
public void visitEnumDeclaration(EnumDeclaration d) {value = 6;}
@Override
public void visitAnnotationTypeDeclaration(AnnotationTypeDeclaration d) {value = 8;}
@Override
public void visitFieldDeclaration(FieldDeclaration d) {value = 10 + staticAdjust(d);}
@Override
public void visitConstructorDeclaration(ConstructorDeclaration d) {value = 12;}
@Override
public void visitMethodDeclaration(MethodDeclaration d) {value = 14 + staticAdjust(d);}
}
@SuppressWarnings("cast")
private int compareEqualPosition(Declaration d1, Declaration d2) {
assert
(d1.getPosition() == d2.getPosition()) || // Handles two null positions.
(d1.getPosition().file().compareTo(d2.getPosition().file()) == 0 &&
d1.getPosition().line() == d2.getPosition().line() &&
d1.getPosition().column() == d2.getPosition().column());
DeclPartialOrder dpo1 = new DeclPartialOrder();
DeclPartialOrder dpo2 = new DeclPartialOrder();
d1.accept(dpo1);
d2.accept(dpo2);
int difference = dpo1.getValue() - dpo2.getValue();
if (difference != 0)
return difference;
else {
int result = d1.getSimpleName().compareTo(d2.getSimpleName());
if (result != 0)
return result;
return (int)( Long.signum((long)System.identityHashCode(d1) -
(long)System.identityHashCode(d2)));
}
}
public int compare(Declaration d1, Declaration d2) {
if (equals(d1, d2))
return 0;
SourcePosition p1 = d1.getPosition();
SourcePosition p2 = d2.getPosition();
if (p1 == null && p2 != null)
return 1;
else if (p1 != null && p2 == null)
return -1;
else if(p1 == null && p2 == null)
return compareEqualPosition(d1, d2);
else {
assert p1 != null && p2 != null;
int fileComp = p1.file().compareTo(p2.file()) ;
if (fileComp == 0) {
long diff = (long)p1.line() - (long)p2.line();
if (diff == 0) {
diff = Long.signum((long)p1.column() - (long)p2.column());
if (diff != 0)
return (int)diff;
else {
// declarations may be two
// compiler-generated members with the
// same source position
return compareEqualPosition(d1, d2);
}
} else
return (diff<0)? -1:1;
} else
return fileComp;
}
}
}
final static java.util.Comparator<Declaration> comparator = new SourceOrderComparator();
SourceOrderDeclScanner(DeclarationVisitor pre, DeclarationVisitor post) {
super(pre, post);
}
/**
* Visits a type declaration.
*
* @param d the declaration to visit
*/
public void visitTypeDeclaration(TypeDeclaration d) {
d.accept(pre);
SortedSet<Declaration> decls = new
TreeSet<Declaration>(SourceOrderDeclScanner.comparator) ;
for(TypeParameterDeclaration tpDecl: d.getFormalTypeParameters()) {
decls.add(tpDecl);
}
for(FieldDeclaration fieldDecl: d.getFields()) {
decls.add(fieldDecl);
}
for(MethodDeclaration methodDecl: d.getMethods()) {
decls.add(methodDecl);
}
for(TypeDeclaration typeDecl: d.getNestedTypes()) {
decls.add(typeDecl);
}
for(Declaration decl: decls )
decl.accept(this);
d.accept(post);
}
/**
* Visits a class declaration.
*
* @param d the declaration to visit
*/
public void visitClassDeclaration(ClassDeclaration d) {
d.accept(pre);
SortedSet<Declaration> decls = new
TreeSet<Declaration>(SourceOrderDeclScanner.comparator) ;
for(TypeParameterDeclaration tpDecl: d.getFormalTypeParameters()) {
decls.add(tpDecl);
}
for(FieldDeclaration fieldDecl: d.getFields()) {
decls.add(fieldDecl);
}
for(MethodDeclaration methodDecl: d.getMethods()) {
decls.add(methodDecl);
}
for(TypeDeclaration typeDecl: d.getNestedTypes()) {
decls.add(typeDecl);
}
for(ConstructorDeclaration ctorDecl: d.getConstructors()) {
decls.add(ctorDecl);
}
for(Declaration decl: decls )
decl.accept(this);
d.accept(post);
}
public void visitExecutableDeclaration(ExecutableDeclaration d) {
d.accept(pre);
SortedSet<Declaration> decls = new
TreeSet<Declaration>(SourceOrderDeclScanner.comparator) ;
for(TypeParameterDeclaration tpDecl: d.getFormalTypeParameters())
decls.add(tpDecl);
for(ParameterDeclaration pDecl: d.getParameters())
decls.add(pDecl);
for(Declaration decl: decls )
decl.accept(this);
d.accept(post);
}
}
| 8,938 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TypeVisitor.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/TypeVisitor.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import com.sun.mirror.type.*;
/**
* A visitor for types, in the style of the standard visitor design pattern.
* This is used to operate on a type when the kind
* of type is unknown at compile time.
* When a visitor is passed to a type's
* {@link TypeMirror#accept accept} method,
* the most specific <tt>visit<i>Xxx</i></tt> method applicable to
* that type is invoked.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this interface is {@link
* javax.lang.model.element.TypeVisitor}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public interface TypeVisitor {
/**
* Visits a type mirror.
*
* @param t the type to visit
*/
public void visitTypeMirror(TypeMirror t);
/**
* Visits a primitive type.
* @param t the type to visit
*/
public void visitPrimitiveType(PrimitiveType t);
/**
* Visits a void type.
*
* @param t the type to visit
*/
public void visitVoidType(VoidType t);
/**
* Visits a reference type.
*
* @param t the type to visit
*/
public void visitReferenceType(ReferenceType t);
/**
* Visits a declared type.
*
* @param t the type to visit
*/
public void visitDeclaredType(DeclaredType t);
/**
* Visits a class type.
*
* @param t the type to visit
*/
public void visitClassType(ClassType t);
/**
* Visits an enum type.
*
* @param t the type to visit
*/
public void visitEnumType(EnumType t);
/**
* Visits an interface type.
*
* @param t the type to visit
*/
public void visitInterfaceType(InterfaceType t);
/**
* Visits an annotation type.
*
* @param t the type to visit
*/
public void visitAnnotationType(AnnotationType t);
/**
* Visits an array type.
*
* @param t the type to visit
*/
public void visitArrayType(ArrayType t);
/**
* Visits a type variable.
*
* @param t the type to visit
*/
public void visitTypeVariable(TypeVariable t);
/**
* Visits a wildcard.
*
* @param t the type to visit
*/
public void visitWildcardType(WildcardType t);
}
| 3,638 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SimpleDeclarationVisitor.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/SimpleDeclarationVisitor.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import com.sun.mirror.declaration.*;
/**
* A simple visitor for declarations.
*
* <p> The implementations of the methods of this class do nothing but
* delegate up the declaration hierarchy. A subclass should override the
* methods that correspond to the kinds of declarations on which it
* will operate.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this class is {@link
* javax.lang.model.util.SimpleElementVisitor6}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public class SimpleDeclarationVisitor implements DeclarationVisitor {
/**
* Creates a new <tt>SimpleDeclarationVisitor</tt>.
*/
public SimpleDeclarationVisitor(){}
/**
* Visits a declaration.
* The implementation does nothing.
* @param d the declaration to visit
*/
public void visitDeclaration(Declaration d) {
}
/**
* Visits a package declaration.
* The implementation simply invokes
* {@link #visitDeclaration visitDeclaration}.
* @param d the declaration to visit
*/
public void visitPackageDeclaration(PackageDeclaration d) {
visitDeclaration(d);
}
/**
* Visits a member or constructor declaration.
* The implementation simply invokes
* {@link #visitDeclaration visitDeclaration}.
* @param d the declaration to visit
*/
public void visitMemberDeclaration(MemberDeclaration d) {
visitDeclaration(d);
}
/**
* Visits a type declaration.
* The implementation simply invokes
* {@link #visitMemberDeclaration visitMemberDeclaration}.
* @param d the declaration to visit
*/
public void visitTypeDeclaration(TypeDeclaration d) {
visitMemberDeclaration(d);
}
/**
* Visits a class declaration.
* The implementation simply invokes
* {@link #visitTypeDeclaration visitTypeDeclaration}.
* @param d the declaration to visit
*/
public void visitClassDeclaration(ClassDeclaration d) {
visitTypeDeclaration(d);
}
/**
* Visits an enum declaration.
* The implementation simply invokes
* {@link #visitClassDeclaration visitClassDeclaration}.
* @param d the declaration to visit
*/
public void visitEnumDeclaration(EnumDeclaration d) {
visitClassDeclaration(d);
}
/**
* Visits an interface declaration.
* The implementation simply invokes
* {@link #visitTypeDeclaration visitTypeDeclaration}.
* @param d the declaration to visit
*/
public void visitInterfaceDeclaration(InterfaceDeclaration d) {
visitTypeDeclaration(d);
}
/**
* Visits an annotation type declaration.
* The implementation simply invokes
* {@link #visitInterfaceDeclaration visitInterfaceDeclaration}.
* @param d the declaration to visit
*/
public void visitAnnotationTypeDeclaration(AnnotationTypeDeclaration d) {
visitInterfaceDeclaration(d);
}
/**
* Visits a field declaration.
* The implementation simply invokes
* {@link #visitMemberDeclaration visitMemberDeclaration}.
* @param d the declaration to visit
*/
public void visitFieldDeclaration(FieldDeclaration d) {
visitMemberDeclaration(d);
}
/**
* Visits an enum constant declaration.
* The implementation simply invokes
* {@link #visitFieldDeclaration visitFieldDeclaration}.
* @param d the declaration to visit
*/
public void visitEnumConstantDeclaration(EnumConstantDeclaration d) {
visitFieldDeclaration(d);
}
/**
* Visits a method or constructor declaration.
* The implementation simply invokes
* {@link #visitMemberDeclaration visitMemberDeclaration}.
* @param d the declaration to visit
*/
public void visitExecutableDeclaration(ExecutableDeclaration d) {
visitMemberDeclaration(d);
}
/**
* Visits a constructor declaration.
* The implementation simply invokes
* {@link #visitExecutableDeclaration visitExecutableDeclaration}.
* @param d the declaration to visit
*/
public void visitConstructorDeclaration(ConstructorDeclaration d) {
visitExecutableDeclaration(d);
}
/**
* Visits a method declaration.
* The implementation simply invokes
* {@link #visitExecutableDeclaration visitExecutableDeclaration}.
* @param d the declaration to visit
*/
public void visitMethodDeclaration(MethodDeclaration d) {
visitExecutableDeclaration(d);
}
/**
* Visits an annotation type element declaration.
* The implementation simply invokes
* {@link #visitMethodDeclaration visitMethodDeclaration}.
* @param d the declaration to visit
*/
public void visitAnnotationTypeElementDeclaration(
AnnotationTypeElementDeclaration d) {
visitMethodDeclaration(d);
}
/**
* Visits a parameter declaration.
* The implementation simply invokes
* {@link #visitDeclaration visitDeclaration}.
* @param d the declaration to visit
*/
public void visitParameterDeclaration(ParameterDeclaration d) {
visitDeclaration(d);
}
/**
* Visits a type parameter declaration.
* The implementation simply invokes
* {@link #visitDeclaration visitDeclaration}.
* @param d the declaration to visit
*/
public void visitTypeParameterDeclaration(TypeParameterDeclaration d) {
visitDeclaration(d);
}
}
| 6,916 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SimpleTypeVisitor.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/SimpleTypeVisitor.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import com.sun.mirror.type.*;
/**
* A simple visitor for types.
*
* <p> The implementations of the methods of this class do nothing but
* delegate up the type hierarchy. A subclass should override the
* methods that correspond to the kinds of types on which it will
* operate.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this class is {@link
* javax.lang.model.util.SimpleTypeVisitor6}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public class SimpleTypeVisitor implements TypeVisitor {
/**
* Creates a new <tt>SimpleTypeVisitor</tt>.
*/
public SimpleTypeVisitor() {}
/**
* Visits a type mirror.
* The implementation does nothing.
* @param t the type to visit
*/
public void visitTypeMirror(TypeMirror t) {
}
/**
* Visits a primitive type.
* The implementation simply invokes
* {@link #visitTypeMirror visitTypeMirror}.
* @param t the type to visit
*/
public void visitPrimitiveType(PrimitiveType t) {
visitTypeMirror(t);
}
/**
* Visits a void type.
* The implementation simply invokes
* {@link #visitTypeMirror visitTypeMirror}.
* @param t the type to visit
*/
public void visitVoidType(VoidType t) {
visitTypeMirror(t);
}
/**
* Visits a reference type.
* The implementation simply invokes
* {@link #visitTypeMirror visitTypeMirror}.
* @param t the type to visit
*/
public void visitReferenceType(ReferenceType t) {
visitTypeMirror(t);
}
/**
* Visits a declared type.
* The implementation simply invokes
* {@link #visitReferenceType visitReferenceType}.
* @param t the type to visit
*/
public void visitDeclaredType(DeclaredType t) {
visitReferenceType(t);
}
/**
* Visits a class type.
* The implementation simply invokes
* {@link #visitDeclaredType visitDeclaredType}.
* @param t the type to visit
*/
public void visitClassType(ClassType t) {
visitDeclaredType(t);
}
/**
* Visits an enum type.
* The implementation simply invokes
* {@link #visitClassType visitClassType}.
* @param t the type to visit
*/
public void visitEnumType(EnumType t) {
visitClassType(t);
}
/**
* Visits an interface type.
* The implementation simply invokes
* {@link #visitDeclaredType visitDeclaredType}.
* @param t the type to visit
*/
public void visitInterfaceType(InterfaceType t) {
visitDeclaredType(t);
}
/**
* Visits an annotation type.
* The implementation simply invokes
* {@link #visitInterfaceType visitInterfaceType}.
* @param t the type to visit
*/
public void visitAnnotationType(AnnotationType t) {
visitInterfaceType(t);
}
/**
* Visits an array type.
* The implementation simply invokes
* {@link #visitReferenceType visitReferenceType}.
* @param t the type to visit
*/
public void visitArrayType(ArrayType t) {
visitReferenceType(t);
}
/**
* Visits a type variable.
* The implementation simply invokes
* {@link #visitReferenceType visitReferenceType}.
* @param t the type to visit
*/
public void visitTypeVariable(TypeVariable t) {
visitReferenceType(t);
}
/**
* Visits a wildcard.
* The implementation simply invokes
* {@link #visitTypeMirror visitTypeMirror}.
* @param t the type to visit
*/
public void visitWildcardType(WildcardType t) {
visitTypeMirror(t);
}
}
| 5,059 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Types.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/Types.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import java.util.Collection;
import com.sun.mirror.declaration.*;
import com.sun.mirror.type.*;
/**
* Utility methods for operating on types.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this interface is {@link
* javax.lang.model.util.Types}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public interface Types {
/**
* Tests whether one type is a subtype of the another.
* Any type is considered to be a subtype of itself.
*
* @param t1 the first type
* @param t2 the second type
* @return <tt>true</tt> if and only if the first type is a subtype
* of the second
*/
boolean isSubtype(TypeMirror t1, TypeMirror t2);
/**
* Tests whether one type is assignable to another.
*
* @param t1 the first type
* @param t2 the second type
* @return <tt>true</tt> if and only if the first type is assignable
* to the second
*/
boolean isAssignable(TypeMirror t1, TypeMirror t2);
/**
* Returns the erasure of a type.
*
* @param t the type to be erased
* @return the erasure of the given type
*/
TypeMirror getErasure(TypeMirror t);
/**
* Returns a primitive type.
*
* @param kind the kind of primitive type to return
* @return a primitive type
*/
PrimitiveType getPrimitiveType(PrimitiveType.Kind kind);
/**
* Returns the pseudo-type representing the type of <tt>void</tt>.
*
* @return the pseudo-type representing the type of <tt>void</tt>
*/
VoidType getVoidType();
/**
* Returns an array type with the specified component type.
*
* @param componentType the component type
* @return an array type with the specified component type.
* @throws IllegalArgumentException if the component type is not valid for
* an array
*/
ArrayType getArrayType(TypeMirror componentType);
/**
* Returns the type variable declared by a type parameter.
*
* @param tparam the type parameter
* @return the type variable declared by the type parameter
*/
TypeVariable getTypeVariable(TypeParameterDeclaration tparam);
/**
* Returns a new wildcard.
* Either the wildcards's upper bounds or lower bounds may be
* specified, or neither, but not both.
*
* @param upperBounds the upper bounds of this wildcard,
* or an empty collection if none
* @param lowerBounds the lower bounds of this wildcard,
* or an empty collection if none
* @return a new wildcard
* @throws IllegalArgumentException if bounds are not valid
*/
WildcardType getWildcardType(Collection<ReferenceType> upperBounds,
Collection<ReferenceType> lowerBounds);
/**
* Returns the type corresponding to a type declaration and
* actual type arguments.
* Given the declaration for <tt>String</tt>, for example, this
* method may be used to get the <tt>String</tt> type. It may
* then be invoked a second time, with the declaration for <tt>Set</tt>,
* to make the parameterized type {@code Set<String>}.
*
* <p> The number of type arguments must either equal the
* number of the declaration's formal type parameters, or must be
* zero. If zero, and if the declaration is generic,
* then the declaration's raw type is returned.
*
* <p> If a parameterized type is being returned, its declaration
* must not be contained within a generic outer class.
* The parameterized type {@code Outer<String>.Inner<Number>},
* for example, may be constructed by first using this
* method to get the type {@code Outer<String>}, and then invoking
* {@link #getDeclaredType(DeclaredType, TypeDeclaration, TypeMirror...)}.
*
* @param decl the type declaration
* @param typeArgs the actual type arguments
* @return the type corresponding to the type declaration and
* actual type arguments
* @throws IllegalArgumentException if too many or too few
* type arguments are given, or if an inappropriate type
* argument or declaration is provided
*/
DeclaredType getDeclaredType(TypeDeclaration decl,
TypeMirror... typeArgs);
/**
* Returns the type corresponding to a type declaration
* and actual arguments, given a
* {@linkplain DeclaredType#getContainingType() containing type}
* of which it is a member.
* The parameterized type {@code Outer<String>.Inner<Number>},
* for example, may be constructed by first using
* {@link #getDeclaredType(TypeDeclaration, TypeMirror...)}
* to get the type {@code Outer<String>}, and then invoking
* this method.
*
* <p> If the containing type is a parameterized type,
* the number of type arguments must equal the
* number of the declaration's formal type parameters.
* If it is not parameterized or if it is <tt>null</tt>, this method is
* equivalent to <tt>getDeclaredType(decl, typeArgs)</tt>.
*
* @param containing the containing type, or <tt>null</tt> if none
* @param decl the type declaration
* @param typeArgs the actual type arguments
* @return the type corresponding to the type declaration and
* actual type arguments,
* contained within the given type
* @throws IllegalArgumentException if too many or too few
* type arguments are given, or if an inappropriate type
* argument, declaration, or containing type is provided
*/
DeclaredType getDeclaredType(DeclaredType containing,
TypeDeclaration decl,
TypeMirror... typeArgs);
}
| 7,295 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DeclarationScanner.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/DeclarationScanner.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import com.sun.mirror.declaration.*;
/**
* A visitor for declarations that scans declarations contained within
* the given declaration. For example, when visiting a class, the
* methods, fields, constructors, and nested types of the class are
* also visited.
*
* <p> To control the processing done on a declaration, users of this
* class pass in their own visitors for pre and post processing. The
* preprocessing visitor is called before the contained declarations
* are scanned; the postprocessing visitor is called after the
* contained declarations are scanned.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this class is {@link
* javax.lang.model.util.ElementScanner6}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
class DeclarationScanner implements DeclarationVisitor {
protected DeclarationVisitor pre;
protected DeclarationVisitor post;
DeclarationScanner(DeclarationVisitor pre, DeclarationVisitor post) {
this.pre = pre;
this.post = post;
}
/**
* Visits a declaration.
*
* @param d the declaration to visit
*/
public void visitDeclaration(Declaration d) {
d.accept(pre);
d.accept(post);
}
/**
* Visits a package declaration.
*
* @param d the declaration to visit
*/
public void visitPackageDeclaration(PackageDeclaration d) {
d.accept(pre);
for(ClassDeclaration classDecl: d.getClasses()) {
classDecl.accept(this);
}
for(InterfaceDeclaration interfaceDecl: d.getInterfaces()) {
interfaceDecl.accept(this);
}
d.accept(post);
}
/**
* Visits a member or constructor declaration.
*
* @param d the declaration to visit
*/
public void visitMemberDeclaration(MemberDeclaration d) {
visitDeclaration(d);
}
/**
* Visits a type declaration.
*
* @param d the declaration to visit
*/
public void visitTypeDeclaration(TypeDeclaration d) {
d.accept(pre);
for(TypeParameterDeclaration tpDecl: d.getFormalTypeParameters()) {
tpDecl.accept(this);
}
for(FieldDeclaration fieldDecl: d.getFields()) {
fieldDecl.accept(this);
}
for(MethodDeclaration methodDecl: d.getMethods()) {
methodDecl.accept(this);
}
for(TypeDeclaration typeDecl: d.getNestedTypes()) {
typeDecl.accept(this);
}
d.accept(post);
}
/**
* Visits a class declaration.
*
* @param d the declaration to visit
*/
public void visitClassDeclaration(ClassDeclaration d) {
d.accept(pre);
for(TypeParameterDeclaration tpDecl: d.getFormalTypeParameters()) {
tpDecl.accept(this);
}
for(FieldDeclaration fieldDecl: d.getFields()) {
fieldDecl.accept(this);
}
for(MethodDeclaration methodDecl: d.getMethods()) {
methodDecl.accept(this);
}
for(TypeDeclaration typeDecl: d.getNestedTypes()) {
typeDecl.accept(this);
}
for(ConstructorDeclaration ctorDecl: d.getConstructors()) {
ctorDecl.accept(this);
}
d.accept(post);
}
/**
* Visits an enum declaration.
*
* @param d the declaration to visit
*/
public void visitEnumDeclaration(EnumDeclaration d) {
visitClassDeclaration(d);
}
/**
* Visits an interface declaration.
*
* @param d the declaration to visit
*/
public void visitInterfaceDeclaration(InterfaceDeclaration d) {
visitTypeDeclaration(d);
}
/**
* Visits an annotation type declaration.
*
* @param d the declaration to visit
*/
public void visitAnnotationTypeDeclaration(AnnotationTypeDeclaration d) {
visitInterfaceDeclaration(d);
}
/**
* Visits a field declaration.
*
* @param d the declaration to visit
*/
public void visitFieldDeclaration(FieldDeclaration d) {
visitMemberDeclaration(d);
}
/**
* Visits an enum constant declaration.
*
* @param d the declaration to visit
*/
public void visitEnumConstantDeclaration(EnumConstantDeclaration d) {
visitFieldDeclaration(d);
}
/**
* Visits a method or constructor declaration.
*
* @param d the declaration to visit
*/
public void visitExecutableDeclaration(ExecutableDeclaration d) {
d.accept(pre);
for(TypeParameterDeclaration tpDecl: d.getFormalTypeParameters()) {
tpDecl.accept(this);
}
for(ParameterDeclaration pDecl: d.getParameters()) {
pDecl.accept(this);
}
d.accept(post);
}
/**
* Visits a constructor declaration.
*
* @param d the declaration to visit
*/
public void visitConstructorDeclaration(ConstructorDeclaration d) {
visitExecutableDeclaration(d);
}
/**
* Visits a method declaration.
*
* @param d the declaration to visit
*/
public void visitMethodDeclaration(MethodDeclaration d) {
visitExecutableDeclaration(d);
}
/**
* Visits an annotation type element declaration.
*
* @param d the declaration to visit
*/
public void visitAnnotationTypeElementDeclaration(
AnnotationTypeElementDeclaration d) {
visitMethodDeclaration(d);
}
/**
* Visits a parameter declaration.
*
* @param d the declaration to visit
*/
public void visitParameterDeclaration(ParameterDeclaration d) {
visitDeclaration(d);
}
/**
* Visits a type parameter declaration.
*
* @param d the declaration to visit
*/
public void visitTypeParameterDeclaration(TypeParameterDeclaration d) {
visitDeclaration(d);
}
}
| 7,352 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DeclarationFilter.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/DeclarationFilter.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import java.util.ArrayList;
import java.util.Collection;
import com.sun.mirror.declaration.Declaration;
import com.sun.mirror.declaration.Modifier;
import static com.sun.mirror.declaration.Modifier.*;
/**
* A filter for selecting just the items of interest
* from a collection of declarations.
* The filter is said to <i>select</i> or to <i>match</i> those declarations.
* Filters can be created in several ways:
* by the static methods described below,
* by negating or composing existing filters,
* or by subclasses that implement arbitrary matching rules.
*
* <p> A subclass can create an arbitrary filter simply by implementing
* the {@link #matches(Declaration)} method.
*
* <p> Examples.
* <p> Selecting the <tt>public</tt> declarations from a collection:
* <blockquote><pre>
* result = FILTER_PUBLIC.filter(decls); </pre></blockquote>
* Selecting class declarations (including enums):
* <blockquote><pre>
* classFilter = DeclarationFilter.getFilter(ClassDeclaration.class);
* result = classFilter.filter(decls); </pre></blockquote>
* Selecting class declarations but excluding enums:
* <blockquote><pre>
* enumFilter = DeclarationFilter.getFilter(EnumDeclaration.class);
* compoundFilter = classFilter.and(enumFilter.not());
* result = compoundFilter.filter(decls); </pre></blockquote>
* Selecting declarations named "Bob":
* <blockquote><pre>
* nameFilter = new DeclarationFilter() {
* public boolean matches(Declaration d) {
* return d.getSimpleName().equals("Bob");
* }
* };
* result = nameFilter.filter(decls); </pre></blockquote>
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. The replacement for the
* functionality of this class is {@link
* javax.lang.model.util.ElementFilter}.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public class DeclarationFilter {
// Predefined filters for convenience.
/**
* A filter that selects only <tt>public</tt> declarations.
*/
public static final DeclarationFilter FILTER_PUBLIC =
new AccessFilter(PUBLIC);
/**
* A filter that selects only <tt>protected</tt> declarations.
*/
public static final DeclarationFilter FILTER_PROTECTED =
new AccessFilter(PROTECTED);
/**
* A filter that selects only <tt>public</tt> or <tt>protected</tt>
* declarations.
*/
public static final DeclarationFilter FILTER_PUBLIC_OR_PROTECTED =
new AccessFilter(PUBLIC, PROTECTED);
/**
* A filter that selects only package-private (<i>default</i>)
* declarations.
*/
public static final DeclarationFilter FILTER_PACKAGE =
new AccessFilter();
/**
* A filter that selects only <tt>private</tt> declarations.
*/
public static final DeclarationFilter FILTER_PRIVATE =
new AccessFilter(PRIVATE);
/**
* Constructs an identity filter: one that selects all declarations.
*/
public DeclarationFilter() {
}
// Methods to create a filter.
/**
* Returns a filter that selects declarations containing all of a
* collection of modifiers.
*
* @param mods the modifiers to match (non-null)
* @return a filter that matches declarations containing <tt>mods</tt>
*/
public static DeclarationFilter getFilter(
final Collection<Modifier> mods) {
return new DeclarationFilter() {
public boolean matches(Declaration d) {
return d.getModifiers().containsAll(mods);
}
};
}
/**
* Returns a filter that selects declarations of a particular kind.
* For example, there may be a filter that selects only class
* declarations, or only fields.
* The filter will select declarations of the specified kind,
* and also any subtypes of that kind; for example, a field filter
* will also select enum constants.
*
* @param kind the kind of declarations to select
* @return a filter that selects declarations of a particular kind
*/
public static DeclarationFilter getFilter(
final Class<? extends Declaration> kind) {
return new DeclarationFilter() {
public boolean matches(Declaration d) {
return kind.isInstance(d);
}
};
}
/**
* Returns a filter that selects those declarations selected
* by both this filter and another.
*
* @param f filter to be composed with this one
* @return a filter that selects those declarations selected by
* both this filter and another
*/
public DeclarationFilter and(DeclarationFilter f) {
final DeclarationFilter f1 = this;
final DeclarationFilter f2 = f;
return new DeclarationFilter() {
public boolean matches(Declaration d) {
return f1.matches(d) && f2.matches(d);
}
};
}
/**
* Returns a filter that selects those declarations selected
* by either this filter or another.
*
* @param f filter to be composed with this one
* @return a filter that selects those declarations selected by
* either this filter or another
*/
public DeclarationFilter or(DeclarationFilter f) {
final DeclarationFilter f1 = this;
final DeclarationFilter f2 = f;
return new DeclarationFilter() {
public boolean matches(Declaration d) {
return f1.matches(d) || f2.matches(d);
}
};
}
/**
* Returns a filter that selects those declarations not selected
* by this filter.
*
* @return a filter that selects those declarations not selected
* by this filter
*/
public DeclarationFilter not() {
return new DeclarationFilter() {
public boolean matches(Declaration d) {
return !DeclarationFilter.this.matches(d);
}
};
}
// Methods to apply a filter.
/**
* Tests whether this filter matches a given declaration.
* The default implementation always returns <tt>true</tt>;
* subclasses should override this.
*
* @param decl the declaration to match
* @return <tt>true</tt> if this filter matches the given declaration
*/
public boolean matches(Declaration decl) {
return true;
}
/**
* Returns the declarations matched by this filter.
* The result is a collection of the same type as the argument;
* the {@linkplain #filter(Collection, Class) two-parameter version}
* of <tt>filter</tt> offers control over the result type.
*
* @param <D> type of the declarations being filtered
* @param decls declarations being filtered
* @return the declarations matched by this filter
*/
public <D extends Declaration> Collection<D> filter(Collection<D> decls) {
ArrayList<D> res = new ArrayList<D>(decls.size());
for (D d : decls) {
if (matches(d)) {
res.add(d);
}
}
return res;
}
/**
* Returns the declarations matched by this filter, with the result
* being restricted to declarations of a given kind.
* Similar to the simpler
* {@linkplain #filter(Collection) single-parameter version}
* of <tt>filter</tt>, but the result type is specified explicitly.
*
* @param <D> type of the declarations being returned
* @param decls declarations being filtered
* @param resType type of the declarations being returned --
* the reflective view of <tt>D</tt>
* @return the declarations matched by this filter, restricted to those
* of the specified type
*/
public <D extends Declaration> Collection<D>
filter(Collection<? extends Declaration> decls, Class<D> resType) {
ArrayList<D> res = new ArrayList<D>(decls.size());
for (Declaration d : decls) {
if (resType.isInstance(d) && matches(d)) {
res.add(resType.cast(d));
}
}
return res;
}
/*
* A filter based on access modifiers.
*/
private static class AccessFilter extends DeclarationFilter {
// The first access modifier to filter on, or null if we're looking
// for declarations with no access modifiers.
private Modifier mod1 = null;
// The second access modifier to filter on, or null if none.
private Modifier mod2 = null;
// Returns a filter that matches declarations with no access
// modifiers.
AccessFilter() {
}
// Returns a filter that matches m.
AccessFilter(Modifier m) {
mod1 = m;
}
// Returns a filter that matches either m1 or m2.
AccessFilter(Modifier m1, Modifier m2) {
mod1 = m1;
mod2 = m2;
}
public boolean matches(Declaration d) {
Collection<Modifier> mods = d.getModifiers();
if (mod1 == null) { // looking for package private
return !(mods.contains(PUBLIC) ||
mods.contains(PROTECTED) ||
mods.contains(PRIVATE));
}
return mods.contains(mod1) &&
(mod2 == null || mods.contains(mod2));
}
}
}
| 11,011 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SourcePosition.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/mirror/util/SourcePosition.java | /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.mirror.util;
import java.io.File;
/**
* Represents a position in a source file.
*
* @deprecated All components of this API have been superseded by the
* standardized annotation processing API. There is no direct
* replacement for the functionality of this interface since the
* standardized {@link javax.annotation.processing.Messager Messager}
* API implicitly takes a source position argument via any element,
* annotation mirror, or annotation value passed along with the
* message.
*
* @author Joseph D. Darcy
* @author Scott Seligman
* @since 1.5
*/
@Deprecated
@SuppressWarnings("deprecation")
public interface SourcePosition {
/**
* Returns the source file containing this position.
*
* @return the source file containing this position; never null
*/
File file();
/**
* Returns the line number of this position. Lines are numbered
* starting with 1.
*
* @return the line number of this position, or 0 if the line
* number is unknown or not applicable
*/
int line();
/**
* Returns the column number of this position. Columns are numbered
* starting with 1.
*
* @return the column number of this position, or 0 if the column
* number is unknown or not applicable
*/
int column();
}
| 2,539 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TypeVariable.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/TypeVariable.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a type variable.
* For example, the generic interface {@code List<E>} has a single
* type variable {@code E}.
* A type variable may have explicit bounds, as in
* {@code C<R extends Remote>}.
*
* @author Scott Seligman
* @since 1.5
*/
public interface TypeVariable extends Type {
/**
* Return the bounds of this type variable.
* These are the types given by the <i>extends</i> clause.
* Return an empty array if there are no explicit bounds.
*
* @return the bounds of this type variable.
*/
Type[] bounds();
/**
* Return the class, interface, method, or constructor within
* which this type variable is declared.
*
* @return the class, interface, method, or constructor within
* which this type variable is declared.
*/
ProgramElementDoc owner();
}
| 2,095 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
MemberDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/MemberDoc.java | /*
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a member of a java class: field, constructor, or method.
* This is an abstract class dealing with information common to
* method, constructor and field members. Class members of a class
* (innerclasses) are represented instead by ClassDoc.
*
* @see MethodDoc
* @see FieldDoc
* @see ClassDoc
*
* @author Kaiyang Liu (original)
* @author Robert Field (rewrite)
*/
public interface MemberDoc extends ProgramElementDoc {
/**
* Returns true if this member was synthesized by the compiler.
*/
boolean isSynthetic();
}
| 1,794 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
MethodDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/MethodDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a method of a java class.
*
* @since 1.2
* @author Robert Field
*/
public interface MethodDoc extends ExecutableMemberDoc {
/**
* Return true if this method is abstract
*/
boolean isAbstract();
/**
* Get return type.
*
* @return the return type of this method, null if it
* is a constructor.
*/
Type returnType();
/**
* Return the class containing the method that this method overrides.
*
* <p> <i>The <code>overriddenClass</code> method cannot
* accommodate certain generic type constructs. The
* <code>overriddenType</code> method should be used instead.</i>
*
* @return a ClassDoc representing the superclass
* defining a method that this method overrides, or null if
* this method does not override.
*/
ClassDoc overriddenClass();
/**
* Return the type containing the method that this method overrides.
* It may be a <code>ClassDoc</code> or a <code>ParameterizedType</code>.
*
* @return the supertype whose method is overridden, or null if this
* method does not override another in a superclass
* @since 1.5
*/
Type overriddenType();
/**
* Return the method that this method overrides.
*
* @return a MethodDoc representing a method definition
* in a superclass this method overrides, null if
* this method does not override.
*/
MethodDoc overriddenMethod();
/**
* Tests whether this method overrides another.
* The overridden method may be one declared in a superclass or
* a superinterface (unlike {@link #overriddenMethod()}).
*
* <p> When a non-abstract method overrides an abstract one, it is
* also said to <i>implement</i> the other.
*
* @param meth the other method to examine
* @return <tt>true</tt> if this method overrides the other
* @since 1.5
*/
boolean overrides(MethodDoc meth);
}
| 3,249 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ProgramElementDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/ProgramElementDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a java program element: class, interface, field,
* constructor, or method.
* This is an abstract class dealing with information common to
* these elements.
*
* @see MemberDoc
* @see ClassDoc
*
* @author Robert Field
*/
public interface ProgramElementDoc extends Doc {
/**
* Get the containing class or interface of this program element.
*
* @return a ClassDoc for this element's containing class or interface.
* If this is a top-level class or interface, return null.
*/
ClassDoc containingClass();
/**
* Get the package that this program element is contained in.
*
* @return a PackageDoc for this element containing package.
* If in the unnamed package, this PackageDoc will have the
* name "".
*/
PackageDoc containingPackage();
/**
* Get the fully qualified name of this program element.
* For example, for the class <code>java.util.Hashtable</code>,
* return "java.util.Hashtable".
* <p>
* For the method <code>bar()</code> in class <code>Foo</code>
* in the unnamed package, return "Foo.bar".
*
* @return the qualified name of the program element as a String.
*/
String qualifiedName();
/**
* Get the modifier specifier integer.
*
* @see java.lang.reflect.Modifier
*/
int modifierSpecifier();
/**
* Get modifiers string.
* For example, for:
* <pre>
* public abstract int foo() { ... }
* </pre>
* return "public abstract".
* Annotations are not included.
*/
String modifiers();
/**
* Get the annotations of this program element.
* Return an empty array if there are none.
*
* @return the annotations of this program element.
* @since 1.5
*/
AnnotationDesc[] annotations();
/**
* Return true if this program element is public.
*/
boolean isPublic();
/**
* Return true if this program element is protected.
*/
boolean isProtected();
/**
* Return true if this program element is private.
*/
boolean isPrivate();
/**
* Return true if this program element is package private.
*/
boolean isPackagePrivate();
/**
* Return true if this program element is static.
*/
boolean isStatic();
/**
* Return true if this program element is final.
*/
boolean isFinal();
}
| 3,684 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
WildcardType.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/WildcardType.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a wildcard type argument.
* Examples include: <pre>
* {@code <?>}
* {@code <? extends E>}
* {@code <? super T>}
* </pre>
* A wildcard type can have explicit <i>extends</i> bounds
* or explicit <i>super</i> bounds or neither, but not both.
*
* @author Scott Seligman
* @since 1.5
*/
public interface WildcardType extends Type {
/**
* Return the upper bounds of this wildcard type argument
* as given by the <i>extends</i> clause.
* Return an empty array if no such bounds are explicitly given.
*
* @return the extends bounds of this wildcard type argument
*/
Type[] extendsBounds();
/**
* Return the lower bounds of this wildcard type argument
* as given by the <i>super</i> clause.
* Return an empty array if no such bounds are explicitly given.
*
* @return the super bounds of this wildcard type argument
*/
Type[] superBounds();
}
| 2,178 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
LanguageVersion.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/LanguageVersion.java | /*
* Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Java Programming Language version. The constants of this enum
* identify the JDK and J2SE releases containing language changes
* relevant to doclets.
* <p>
* All doclets support at least the 1.1 language version.
* The first release subsequent to this with language changes
* affecting doclets is 1.5.
*
* @since 1.5
*/
public enum LanguageVersion {
/** 1.1 added nested classes and interfaces. */
JAVA_1_1,
/** 1.5 added generic types, annotations, enums, and varArgs. */
JAVA_1_5
}
| 1,754 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
FieldDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/FieldDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a field in a java class.
*
* @see MemberDoc
*
* @since 1.2
* @author Robert Field
*/
public interface FieldDoc extends MemberDoc {
/**
* Get type of this field.
*/
Type type();
/**
* Return true if this field is transient
*/
boolean isTransient();
/**
* Return true if this field is volatile
*/
boolean isVolatile();
/**
* Return the serialField tags in this FieldDoc item.
*
* @return an array of <tt>SerialFieldTag</tt> objects containing
* all <code>@serialField</code> tags.
*/
SerialFieldTag[] serialFieldTags();
/**
* Get the value of a constant field.
*
* @return the value of a constant field. The value is
* automatically wrapped in an object if it has a primitive type.
* If the field is not constant, returns null.
*/
Object constantValue();
/**
* Get the value of a constant field.
*
* @return the text of a Java language expression whose value
* is the value of the constant. The expression uses no identifiers
* other than primitive literals. If the field is
* not constant, returns null.
*/
String constantValueExpression();
}
| 2,488 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AnnotationTypeElementDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/AnnotationTypeElementDoc.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents an element of an annotation type.
*
* @author Scott Seligman
* @since 1.5
*/
public interface AnnotationTypeElementDoc extends MethodDoc {
/**
* Returns the default value of this element.
* Returns null if this element has no default.
*
* @return the default value of this element.
*/
AnnotationValue defaultValue();
}
| 1,616 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ExecutableMemberDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/ExecutableMemberDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a method or constructor of a java class.
*
* @since 1.2
* @author Robert Field
*/
public interface ExecutableMemberDoc extends MemberDoc {
/**
* Return exceptions this method or constructor throws.
* If the type of the exception is a type variable, return the
* <code>ClassDoc</code> of its erasure.
*
* <p> <i>The <code>thrownExceptions</code> method cannot
* accommodate certain generic type constructs. The
* <code>thrownExceptionTypes</code> method should be used
* instead.</i>
*
* @return an array of ClassDoc[] representing the exceptions
* thrown by this method.
* @see #thrownExceptionTypes
*/
ClassDoc[] thrownExceptions();
/**
* Return exceptions this method or constructor throws.
*
* @return an array representing the exceptions thrown by this method.
* Each array element is either a <code>ClassDoc</code> or a
* <code>TypeVariable</code>.
* @since 1.5
*/
Type[] thrownExceptionTypes();
/**
* Return true if this method is native
*/
boolean isNative();
/**
* Return true if this method is synchronized
*/
boolean isSynchronized();
/**
* Return true if this method was declared to take a variable number
* of arguments.
*
* @since 1.5
*/
public boolean isVarArgs();
/**
* Get argument information.
*
* @see Parameter
*
* @return an array of Parameter, one element per argument
* in the order the arguments are present.
*/
Parameter[] parameters();
/**
* Return the throws tags in this method.
*
* @return an array of ThrowTag containing all <code>@exception</code>
* and <code>@throws</code> tags.
*/
ThrowsTag[] throwsTags();
/**
* Return the param tags in this method, excluding the type
* parameter tags.
*
* @return an array of ParamTag containing all <code>@param</code> tags
* corresponding to the parameters of this method.
*/
ParamTag[] paramTags();
/**
* Return the type parameter tags in this method.
*
* @return an array of ParamTag containing all <code>@param</code> tags
* corresponding to the type parameters of this method.
* @since 1.5
*/
ParamTag[] typeParamTags();
/**
* Get the signature. It is the parameter list, type is qualified.
* For instance, for a method <code>mymethod(String x, int y)</code>,
* it will return <code>(java.lang.String,int)</code>.
*/
String signature();
/**
* get flat signature. all types are not qualified.
* return a String, which is the flat signiture of this member.
* It is the parameter list, type is not qualified.
* For instance, for a method <code>mymethod(String x, int y)</code>,
* it will return <code>(String, int)</code>.
*/
String flatSignature();
/**
* Return the formal type parameters of this method or constructor.
* Return an empty array if this method or constructor is not generic.
*
* @return the formal type parameters of this method or constructor.
* @since 1.5
*/
TypeVariable[] typeParameters();
}
| 4,567 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Parameter.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/Parameter.java | /*
* Copyright (c) 1998, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Parameter information.
* This includes a parameter type and parameter name.
*
* @author Robert Field
*/
public interface Parameter {
/**
* Get the type of this parameter.
*/
Type type();
/**
* Get local name of this parameter.
* For example if parameter is the short 'index', returns "index".
*/
String name();
/**
* Get type name of this parameter.
* For example if parameter is the short 'index', returns "short".
* <p>
* This method returns a complete string
* representation of the type, including the dimensions of arrays and
* the type arguments of parameterized types. Names are qualified.
*/
String typeName();
/**
* Returns a string representation of the parameter.
* <p>
* For example if parameter is the short 'index', returns "short index".
*
* @return type and parameter name of this parameter.
*/
String toString();
/**
* Get the annotations of this parameter.
* Return an empty array if there are none.
*
* @return the annotations of this parameter.
* @since 1.5
*/
AnnotationDesc[] annotations();
}
| 2,432 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AnnotationValue.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/AnnotationValue.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a value of an annotation type element.
*
* @author Scott Seligman
* @since 1.5
*/
public interface AnnotationValue {
/**
* Returns the value.
* The type of the returned object is one of the following:
* <ul><li> a wrapper class for a primitive type
* <li> <code>String</code>
* <li> <code>Type</code> (representing a class literal)
* <li> <code>FieldDoc</code> (representing an enum constant)
* <li> <code>AnnotationDesc</code>
* <li> <code>AnnotationValue[]</code>
* </ul>
*
* @return the value.
*/
Object value();
/**
* Returns a string representation of the value.
*
* @return the text of a Java language annotation value expression
* whose value is the value of this element.
*/
String toString();
}
| 2,099 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SerialFieldTag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/SerialFieldTag.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Documents a Serializable field defined by an ObjectStreamField.
* <pre>
* The class parses and stores the three serialField tag parameters:
*
* - field name
* - field type name
* (fully-qualified or visible from the current import context)
* - description of the valid values for the field
* </pre>
* This tag is only allowed in the javadoc for the special member
* serialPersistentFields.
*
* @author Joe Fialli
*
* @see java.io.ObjectStreamField
*/
public interface SerialFieldTag extends Tag, Comparable<Object> {
/**
* Return the serialziable field name.
*/
public String fieldName();
/**
* Return the field type string.
*/
public String fieldType();
/**
* Return the ClassDoc for field type.
*
* @return null if no ClassDoc for field type is visible from
* containingClass context.
*/
public ClassDoc fieldTypeDoc();
/**
* Return the field comment. If there is no serialField comment, return
* javadoc comment of corresponding FieldDoc.
*/
public String description();
/**
* Compares this Object with the specified Object for order. Returns a
* negative integer, zero, or a positive integer as this Object is less
* than, equal to, or greater than the given Object.
* <p>
* Included to make SerialFieldTag items java.lang.Comparable.
*
* @param obj the <code>Object</code> to be compared.
* @return a negative integer, zero, or a positive integer as this Object
* is less than, equal to, or greater than the given Object.
* @exception ClassCastException the specified Object's type prevents it
* from being compared to this Object.
* @since 1.2
*/
public int compareTo(Object obj);
}
| 3,059 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Doclet.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/Doclet.java | /*
* Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* This is an example of a starting class for a doclet,
* showing the entry-point methods. A starting class must
* import com.sun.javadoc.* and implement the
* <code>start(RootDoc)</code> method, as described in the
* <a href="package-summary.html#package_description">package
* description</a>. If the doclet takes command line options,
* it must also implement <code>optionLength</code> and
* <code>validOptions</code>.
*
* <p> A doclet supporting the language features added since 1.1
* (such as generics and annotations) should indicate this
* by implementing <code>languageVersion</code>. In the absence of
* this the doclet should not invoke any of the Doclet API methods
* added since 1.5, and
* the results of several other methods are modified so as
* to conceal the new constructs (such as type parameters) from
* the doclet.
*
* <p> To start the doclet, pass
* <code>-doclet</code> followed by the fully-qualified
* name of the starting class on the javadoc tool command line.
*/
public abstract class Doclet {
/**
* Generate documentation here.
* This method is required for all doclets.
*
* @return true on success.
*/
public static boolean start(RootDoc root) {
return true;
}
/**
* Check for doclet-added options. Returns the number of
* arguments you must specify on the command line for the
* given option. For example, "-d docs" would return 2.
* <P>
* This method is required if the doclet contains any options.
* If this method is missing, Javadoc will print an invalid flag
* error for every option.
*
* @return number of arguments on the command line for an option
* including the option name itself. Zero return means
* option not known. Negative value means error occurred.
*/
public static int optionLength(String option) {
return 0; // default is option unknown
}
/**
* Check that options have the correct arguments.
* <P>
* This method is not required, but is recommended,
* as every option will be considered valid if this method
* is not present. It will default gracefully (to true)
* if absent.
* <P>
* Printing option related error messages (using the provided
* DocErrorReporter) is the responsibility of this method.
*
* @return true if the options are valid.
*/
public static boolean validOptions(String options[][],
DocErrorReporter reporter) {
return true; // default is options are valid
}
/**
* Return the version of the Java Programming Language supported
* by this doclet.
* <p>
* This method is required by any doclet supporting a language version
* newer than 1.1.
*
* @return the language version supported by this doclet.
* @since 1.5
*/
public static LanguageVersion languageVersion() {
return LanguageVersion.JAVA_1_1;
}
}
| 4,275 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
PackageDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/PackageDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a java package. Provides access to information
* about the package, the package's comment and tags, and the
* classes in the package.
* <p>
* Each method whose return type is an array will return an empty
* array (never null) when there are no objects in the result.
*
* @since 1.2
* @author Kaiyang Liu (original)
* @author Robert Field (rewrite)
*/
public interface PackageDoc extends Doc {
/**
* Get all classes and interfaces in the package, filtered to the specified
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
* modifier option</a>.
*
* @return filtered classes and interfaces in this package
* @param filter Specifying true filters according to the specified access
* modifier option.
* Specifying false includes all classes and interfaces
* regardless of access modifier option.
* @since 1.4
*/
ClassDoc[] allClasses(boolean filter);
/**
* Get all
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
* classes and interfaces in the package. Same as allClasses(true).
*
* @return all included classes and interfaces in this package.
*/
ClassDoc[] allClasses();
/**
* Get included
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">ordinary</a>
* classes (that is, exclude exceptions, errors, enums, interfaces, and
* annotation types)
* in this package.
*
* @return included ordinary classes in this package.
*/
ClassDoc[] ordinaryClasses();
/**
* Get included Exception classes in this package.
*
* @return included Exceptions in this package.
*/
ClassDoc[] exceptions();
/**
* Get included Error classes in this package.
*
* @return included Errors in this package.
*/
ClassDoc[] errors();
/**
* Get included enum types in this package.
*
* @return included enum types in this package.
* @since 1.5
*/
ClassDoc[] enums();
/**
* Get included interfaces in this package, omitting annotation types.
*
* @return included interfaces in this package.
*/
ClassDoc[] interfaces();
/**
* Get included annotation types in this package.
*
* @return included annotation types in this package.
* @since 1.5
*/
AnnotationTypeDoc[] annotationTypes();
/**
* Get the annotations of this package.
* Return an empty array if there are none.
*
* @return the annotations of this package.
* @since 1.5
*/
AnnotationDesc[] annotations();
/**
* Lookup a class or interface within this package.
*
* @return ClassDoc of found class or interface,
* or null if not found.
*/
ClassDoc findClass(String className);
}
| 4,171 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ParamTag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/ParamTag.java | /*
* Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents an @param documentation tag.
* Stores the name and comment parts of the parameter tag.
* An @param tag may represent either a method or constructor parameter,
* or a type parameter.
*
* @author Robert Field
*
*/
public interface ParamTag extends Tag {
/**
* Return the name of the parameter or type parameter
* associated with this <code>ParamTag</code>.
* The angle brackets delimiting a type parameter are not part of
* its name.
*
* @return the parameter name.
*/
String parameterName();
/**
* Return the parameter comment
* associated with this <code>ParamTag</code>.
*
* @return the parameter comment.
*/
String parameterComment();
/**
* Return true if this <code>ParamTag</code> corresponds to a type
* parameter. Return false if it corresponds to an ordinary parameter
* of a method or constructor.
*
* @return true if this <code>ParamTag</code> corresponds to a type
* parameter.
* @since 1.5
*/
boolean isTypeParameter();
}
| 2,326 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ThrowsTag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/ThrowsTag.java | /*
* Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a @throws or @exception documentation tag.
* Parses and holds the exception name and exception comment.
* Note: @exception is a backwards compatible synonymy for @throws.
*
* @author Robert Field
* @author Atul M Dambalkar
* @see ExecutableMemberDoc#throwsTags()
*
*/
public interface ThrowsTag extends Tag {
/**
* Return the name of the exception
* associated with this <code>ThrowsTag</code>.
*
* @return name of the exception.
*/
String exceptionName();
/**
* Return the exception comment
* associated with this <code>ThrowsTag</code>.
*
* @return exception comment.
*/
String exceptionComment();
/**
* Return a <code>ClassDoc</code> that represents the exception.
* If the type of the exception is a type variable, return the
* <code>ClassDoc</code> of its erasure.
*
* <p> <i>This method cannot accommodate certain generic type
* constructs. The <code>exceptionType</code> method
* should be used instead.</i>
*
* @return <code>ClassDoc</code> that represents the exception.
* @see #exceptionType
*/
ClassDoc exception();
/**
* Return the type of the exception
* associated with this <code>ThrowsTag</code>.
* This may be a <code>ClassDoc</code> or a <code>TypeVariable</code>.
*
* @return the type of the exception.
* @since 1.5
*/
Type exceptionType();
}
| 2,705 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ConstructorDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/ConstructorDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a constructor of a java class.
*
* @since 1.2
* @author Robert Field
*/
public interface ConstructorDoc extends ExecutableMemberDoc {
}
| 1,398 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DocErrorReporter.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/DocErrorReporter.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* This interface provides error, warning and notice printing.
*
* @since 1.2
* @author Robert Field
*/
public interface DocErrorReporter {
/**
* Print error message and increment error count.
*
* @param msg message to print
*/
void printError(String msg);
/**
* Print an error message and increment error count.
*
* @param pos the position item where the error occurs
* @param msg message to print
* @since 1.4
*/
void printError(SourcePosition pos, String msg);
/**
* Print warning message and increment warning count.
*
* @param msg message to print
*/
void printWarning(String msg);
/**
* Print warning message and increment warning count.
*
* @param pos the position item where the warning occurs
* @param msg message to print
* @since 1.4
*/
void printWarning(SourcePosition pos, String msg);
/**
* Print a message.
*
* @param msg message to print
*/
void printNotice(String msg);
/**
* Print a message.
*
* @param pos the position item where the message occurs
* @param msg message to print
* @since 1.4
*/
void printNotice(SourcePosition pos, String msg);
}
| 2,518 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Tag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/Tag.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
import java.text.BreakIterator;
import java.util.Locale;
/**
* Represents a simple documentation tag, such as @since, @author, @version.
* Given a tag (e.g. "@since 1.2"), holds tag name (e.g. "@since")
* and tag text (e.g. "1.2"). Tags with structure or which require
* special processing are handled by subclasses such as ParamTag
* (for @param), SeeTag (for @see and {@link}), and ThrowsTag
* (for @throws).
*
* @author Robert Field
* @author Atul M Dambalkar
* @see SeeTag
* @see ParamTag
* @see ThrowsTag
* @see SerialFieldTag
* @see Doc#tags()
*
*/
public interface Tag {
/**
* Return the name of this tag. The name is the string
* starting with "@" that is used in a doc comment, such as
* <code>@return</code>. For inline tags, such as
* <code>{@link}</code>, the curly brackets
* are not part of the name, so in this example the name
* would be simply <code>@link</code>.
*/
String name();
/**
* Return the containing {@link Doc} of this Tag element.
*/
Doc holder();
/**
* Return the kind of this tag.
* similar or synonymous tags. For most tags,
* <code>kind() == name()</code>;
* the following table lists those cases where there is more
* than one tag of a given kind:
* <p>
* <table border="1" cellpadding="4" cellspacing="0">
* <tr><th><tt> kind() </th> <th><tt> name() </th></tr>
* <tr><td><tt> @throws </td> <td><tt> @throws </td></tr>
* <tr><td><tt> @throws </td> <td><tt> @exception </td></tr>
* <tr><td><tt> @see </td> <td><tt> @see </td></tr>
* <tr><td><tt> @see </td> <td><tt> @link </td></tr>
* <tr><td><tt> @see </td> <td><tt> @linkplain </td></tr>
* <tr><td><tt> @serial </td> <td><tt> @serial </td></tr>
* <tr><td><tt> @serial </td> <td><tt> @serialData </td></tr>
* </table>
*/
String kind();
/**
* Return the text of this tag, that is, portion beyond tag name.
*/
String text();
/**
* Convert this object to a string.
*/
String toString();
/**
* For a documentation comment with embedded <code>{@link}</code>
* tags, return an array of <code>Tag</code> objects. The entire
* doc comment is broken down into strings separated by
* <code>{@link}</code> tags, where each successive element
* of the array represents either a string or
* <code>{@link}</code> tag, in order, from start to end.
* Each string is represented by a <code>Tag</code> object of
* name "Text", where {@link #text()} returns the string. Each
* <code>{@link}</code> tag is represented by a
* {@link SeeTag} of name "@link" and kind "@see".
* For example, given the following comment
* tag:
* <p>
* <code>This is a {@link Doc commentlabel} example.</code>
* <p>
* return an array of Tag objects:
* <ul>
* <li> tags[0] is a {@link Tag} with name "Text" and text consisting
* of "This is a "
* <li> tags[1] is a {@link SeeTag} with name "@link", referenced
* class <code>Doc</code> and label "commentlabel"
* <li> tags[2] is a {@link Tag} with name "Text" and text consisting
* of " example."
* </ul>
*
* @return Tag[] array of tags
* @see ParamTag
* @see ThrowsTag
*/
Tag[] inlineTags();
/**
* Return the first sentence of the comment as an array of tags.
* Includes inline tags
* (i.e. {@link <i>reference</i>} tags) but not
* block tags.
* Each section of plain text is represented as a {@link Tag}
* of kind "Text".
* Inline tags are represented as a {@link SeeTag} of kind "@link".
* If the locale is English language, the first sentence is
* determined by the rules described in the Java Language
* Specification (first version): "This sentence ends
* at the first period that is followed by a blank, tab, or
* line terminator or at the first tagline.", in
* addition a line will be terminated by paragraph and
* section terminating HTML tags: <p> </p> <h1>
* <h2> <h3> <h4> <h5> <h6>
* <hr> <pre> or </pre>.
* If the locale is not English, the sentence end will be
* determined by
* {@link BreakIterator#getSentenceInstance(Locale)}.
*
* @return an array of {@link Tag} objects representing the
* first sentence of the comment
*/
Tag[] firstSentenceTags();
/**
* Return the source position of this tag.
* @return the source position of this tag.
*/
public SourcePosition position();
}
| 6,066 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Type.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/Type.java | /*
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a type. A type can be a class or interface, an
* invocation (like {@code List<String>}) of a generic class or interface,
* a type variable, a wildcard type ("<code>?</code>"),
* or a primitive data type (like <code>char</code>).
*
* @since 1.2
* @author Kaiyang Liu (original)
* @author Robert Field (rewrite)
* @author Scott Seligman (generics)
*/
public interface Type {
/**
* Return unqualified name of type excluding any dimension information.
* <p>
* For example, a two dimensional array of String returns
* "<code>String</code>".
*/
String typeName();
/**
* Return qualified name of type excluding any dimension information.
*<p>
* For example, a two dimensional array of String
* returns "<code>java.lang.String</code>".
*/
String qualifiedTypeName();
/**
* Return the simple name of this type excluding any dimension information.
* This is the unqualified name of the type, except that for nested types
* only the identifier of the innermost type is included.
* <p>
* For example, the class {@code Outer.Inner} returns
* "<code>Inner</code>".
*
* @since 1.5
*/
String simpleTypeName();
/**
* Return the type's dimension information, as a string.
* <p>
* For example, a two dimensional array of String returns
* "<code>[][]</code>".
*/
String dimension();
/**
* Return a string representation of the type.
* This includes any dimension information and type arguments.
* <p>
* For example, a two dimensional array of String may return
* "<code>java.lang.String[][]</code>",
* and the parameterized type {@code List<Integer>} may return
* "{@code java.util.List<java.lang.Integer>}".
*
* @return a string representation of the type.
*/
String toString();
/**
* Return true if this type represents a primitive type.
*
* @return true if this type represents a primitive type.
* @since 1.5
*/
boolean isPrimitive();
/**
* Return this type as a <code>ClassDoc</code> if it represents a class
* or interface. Array dimensions are ignored.
* If this type is a <code>ParameterizedType</code>,
* <code>TypeVariable</code>, or <code>WildcardType</code>, return
* the <code>ClassDoc</code> of the type's erasure. If this is an
* <code>AnnotationTypeDoc</code>, return this as a <code>ClassDoc</code>
* (but see {@link #asAnnotationTypeDoc()}).
* If this is a primitive type, return null.
*
* @return the <code>ClassDoc</code> of this type,
* or null if it is a primitive type.
*/
ClassDoc asClassDoc();
/**
* Return this type as a <code>ParameterizedType</code> if it represents
* an invocation of a generic class or interface. Array dimensions
* are ignored.
*
* @return a <code>ParameterizedType</code> if the type is an
* invocation of a generic type, or null if it is not.
* @since 1.5
*/
ParameterizedType asParameterizedType();
/**
* Return this type as a <code>TypeVariable</code> if it represents
* a type variable. Array dimensions are ignored.
*
* @return a <code>TypeVariable</code> if the type is a type variable,
* or null if it is not.
* @since 1.5
*/
TypeVariable asTypeVariable();
/**
* Return this type as a <code>WildcardType</code> if it represents
* a wildcard type.
*
* @return a <code>WildcardType</code> if the type is a wildcard type,
* or null if it is not.
* @since 1.5
*/
WildcardType asWildcardType();
/**
* Return this type as an <code>AnnotationTypeDoc</code> if it represents
* an annotation type. Array dimensions are ignored.
*
* @return an <code>AnnotationTypeDoc</code> if the type is an annotation
* type, or null if it is not.
* @since 1.5
*/
AnnotationTypeDoc asAnnotationTypeDoc();
}
| 5,330 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SourcePosition.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/SourcePosition.java | /*
* Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
import java.io.File;
/**
* This interface describes a source position: filename, line number,
* and column number.
*
* @since 1.4
* @author Neal M Gafter
*/
public interface SourcePosition {
/** The source file. Returns null if no file information is
* available. */
File file();
/** The line in the source file. The first line is numbered 1;
* 0 means no line number information is available. */
int line();
/** The column in the source file. The first column is
* numbered 1; 0 means no column information is available.
* Columns count characters in the input stream; a tab
* advances the column number to the next 8-column tab stop.
*/
int column();
/** Convert the source position to the form "Filename:line". */
String toString();
}
| 2,055 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SeeTag.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/SeeTag.java | /*
* Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a user-defined cross-reference to related documentation.
* The tag can reference a package, class or member, or can hold
* plain text. (The plain text might be a reference
* to something not online, such as a printed book, or be a hard-coded
* HTML link.) The reference can either be inline with the comment,
* using <code>{@link}</code>, or a separate block comment,
* using <code>@see</code>.
* Method <code>name()</code> returns "@link" (no curly braces) or
* "@see", depending on the tag.
* Method <code>kind()</code> returns "@see" for both tags.
*
* @author Kaiyang Liu (original)
* @author Robert Field (rewrite)
* @author Atul M Dambalkar
*
*/
public interface SeeTag extends Tag {
/**
* Get the label of the <code>@see</code> tag.
* Return null if no label is present.
* For example, for:
* <p>
* <code>@see String#trim() the trim method</code>
* </p>
* return "the trim method".
*/
String label();
/**
* Get the package doc when <code>@see</code> references only a package.
* Return null if the package cannot be found, or if
* <code>@see</code> references any other element (class,
* interface, field, constructor, method) or non-element.
* For example, for:
* <p>
* <code>@see java.lang</code>
* </p>
* return the <code>PackageDoc</code> for <code>java.lang</code>.
*/
public PackageDoc referencedPackage();
/**
* Get the class or interface name of the <code>@see</code> reference.
* The name is fully qualified if the name specified in the
* original <code>@see</code> tag was fully qualified, or if the class
* or interface can be found; otherwise it is unqualified.
* If <code>@see</code> references only a package name, then return
* the package name instead.
* For example, for:
* <p>
* <code>@see String#valueOf(java.lang.Object)</code>
* </p>
* return "java.lang.String".
* For "<code>@see java.lang</code>", return "java.lang".
* Return null if <code>@see</code> references a non-element, such as
* <code>@see <a href="java.sun.com"></code>.
*/
String referencedClassName();
/**
* Get the class doc referenced by the class name part of @see.
* Return null if the class cannot be found.
* For example, for:
* <p>
* <code>@see String#valueOf(java.lang.Object)</code>
* </p>
* return the <code>ClassDoc</code> for <code>java.lang.String</code>.
*/
ClassDoc referencedClass();
/**
* Get the field, constructor or method substring of the <code>@see</code>
* reference. Return null if the reference is to any other
* element or to any non-element.
* References to member classes (nested classes) return null.
* For example, for:
* <p>
* <code>@see String#startsWith(String)</code>
* </p>
* return "startsWith(String)".
*/
String referencedMemberName();
/**
* Get the member doc for the field, constructor or method
* referenced by <code>@see</code>. Return null if the member cannot
* be found or if the reference is to any other element or to any
* non-element.
* References to member classes (nested classes) return null.
* For example, for:
* <p>
* <code>@see String#startsWith(java.lang.String)</code>
* </p>
* return the <code>MethodDoc</code> for <code>startsWith</code>.
*/
MemberDoc referencedMember();
}
| 4,862 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ClassDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/ClassDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents a java class or interface and provides access to
* information about the class, the class's comment and tags, and the
* members of the class. A ClassDoc only exists if it was
* processed in this run of javadoc. References to classes
* which may or may not have been processed in this run are
* referred to using Type (which can be converted to ClassDoc,
* if possible).
*
* @see Type
*
* @since 1.2
* @author Kaiyang Liu (original)
* @author Robert Field (rewrite)
*/
public interface ClassDoc extends ProgramElementDoc, Type {
/**
* Return true if this class is abstract. Return true
* for all interfaces.
*/
boolean isAbstract();
/**
* Return true if this class implements or interface extends
* <code>java.io.Serializable</code>.
*
* Since <code>java.io.Externalizable</code> extends
* <code>java.io.Serializable</code>,
* Externalizable objects are also Serializable.
*/
boolean isSerializable();
/**
* Return true if this class implements or interface extends
* <code>java.io.Externalizable</code>.
*/
boolean isExternalizable();
/**
* Return the serialization methods for this class or
* interface.
*
* @return an array of MethodDoc objects that represents
* the serialization methods for this class or interface.
*/
MethodDoc[] serializationMethods();
/**
* Return the Serializable fields of this class or interface.
* <p>
* Return either a list of default fields documented by
* <code>serial</code> tag<br>
* or return a single <code>FieldDoc</code> for
* <code>serialPersistentField</code> member.
* There should be a <code>serialField</code> tag for
* each Serializable field defined by an <code>ObjectStreamField</code>
* array component of <code>serialPersistentField</code>.
*
* @return an array of <code>FieldDoc</code> objects for the Serializable
* fields of this class or interface.
*
* @see #definesSerializableFields()
* @see SerialFieldTag
*/
FieldDoc[] serializableFields();
/**
* Return true if Serializable fields are explicitly defined with
* the special class member <code>serialPersistentFields</code>.
*
* @see #serializableFields()
* @see SerialFieldTag
*/
boolean definesSerializableFields();
/**
* Return the superclass of this class. Return null if this is an
* interface.
*
* <p> <i>This method cannot accommodate certain generic type constructs.
* The <code>superclassType</code> method should be used instead.</i>
*
* @return the ClassDoc for the superclass of this class, null if
* there is no superclass.
* @see #superclassType
*/
ClassDoc superclass();
/**
* Return the superclass of this class. Return null if this is an
* interface. A superclass is represented by either a
* <code>ClassDoc</code> or a <code>ParametrizedType</code>.
*
* @return the superclass of this class, or null if there is no superclass.
* @since 1.5
*/
Type superclassType();
/**
* Test whether this class is a subclass of the specified class.
* If this is an interface, return false for all classes except
* <code>java.lang.Object</code> (we must keep this unexpected
* behavior for compatibility reasons).
*
* @param cd the candidate superclass.
* @return true if cd is a superclass of this class.
*/
boolean subclassOf(ClassDoc cd);
/**
* Return interfaces implemented by this class or interfaces extended
* by this interface. Includes only directly-declared interfaces, not
* inherited interfaces.
* Return an empty array if there are no interfaces.
*
* <p> <i>This method cannot accommodate certain generic type constructs.
* The <code>interfaceTypes</code> method should be used instead.</i>
*
* @return an array of ClassDoc objects representing the interfaces.
* @see #interfaceTypes
*/
ClassDoc[] interfaces();
/**
* Return interfaces implemented by this class or interfaces extended
* by this interface. Includes only directly-declared interfaces, not
* inherited interfaces.
* Return an empty array if there are no interfaces.
*
* @return an array of interfaces, each represented by a
* <code>ClassDoc</code> or a <code>ParametrizedType</code>.
* @since 1.5
*/
Type[] interfaceTypes();
/**
* Return the formal type parameters of this class or interface.
* Return an empty array if there are none.
*
* @return the formal type parameters of this class or interface.
* @since 1.5
*/
TypeVariable[] typeParameters();
/**
* Return the type parameter tags of this class or interface.
* Return an empty array if there are none.
*
* @return the type parameter tags of this class or interface.
* @since 1.5
*/
ParamTag[] typeParamTags();
/**
* Return
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
* fields in this class or interface.
* Excludes enum constants if this is an enum type.
*
* @return an array of FieldDoc objects representing the included
* fields in this class or interface.
*/
FieldDoc[] fields();
/**
* Return fields in this class or interface, filtered to the specified
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
* modifier option</a>.
* Excludes enum constants if this is an enum type.
*
* @param filter Specify true to filter according to the specified access
* modifier option.
* Specify false to include all fields regardless of
* access modifier option.
* @return an array of FieldDoc objects representing the included
* fields in this class or interface.
*/
FieldDoc[] fields(boolean filter);
/**
* Return the enum constants if this is an enum type.
* Return an empty array if there are no enum constants, or if
* this is not an enum type.
*
* @return the enum constants if this is an enum type.
*/
FieldDoc[] enumConstants();
/**
* Return
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
* methods in this class or interface.
* Same as <code>methods(true)</code>.
*
* @return an array of MethodDoc objects representing the included
* methods in this class or interface. Does not include
* constructors or annotation type elements.
*/
MethodDoc[] methods();
/**
* Return methods in this class or interface, filtered to the specified
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
* modifier option</a>. Does not include constructors or annotation
* type elements.
*
* @param filter Specify true to filter according to the specified access
* modifier option.
* Specify false to include all methods regardless of
* access modifier option.
* @return an array of MethodDoc objects representing the included
* methods in this class or interface.
*/
MethodDoc[] methods(boolean filter);
/**
* Return
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
* constructors in this class. An array containing the default
* no-arg constructor is returned if no other constructors exist.
* Return empty array if this is an interface.
*
* @return an array of ConstructorDoc objects representing the included
* constructors in this class.
*/
ConstructorDoc[] constructors();
/**
* Return constructors in this class, filtered to the specified
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
* modifier option</a>. Return an array containing the default
* no-arg constructor if no other constructors exist.
*
* @param filter Specify true to filter according to the specified access
* modifier option.
* Specify false to include all constructors regardless of
* access modifier option.
* @return an array of ConstructorDoc objects representing the included
* constructors in this class.
*/
ConstructorDoc[] constructors(boolean filter);
/**
* Return
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
* nested classes and interfaces within this class or interface.
* This includes both static and non-static nested classes.
* (This method should have been named <code>nestedClasses()</code>,
* as inner classes are technically non-static.) Anonymous and local classes
* or interfaces are not included.
*
* @return an array of ClassDoc objects representing the included classes
* and interfaces defined in this class or interface.
*/
ClassDoc[] innerClasses();
/**
* Return nested classes and interfaces within this class or interface
* filtered to the specified
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
* modifier option</a>.
* This includes both static and non-static nested classes.
* Anonymous and local classes are not included.
*
* @param filter Specify true to filter according to the specified access
* modifier option.
* Specify false to include all nested classes regardless of
* access modifier option.
* @return a filtered array of ClassDoc objects representing the included
* classes and interfaces defined in this class or interface.
*/
ClassDoc[] innerClasses(boolean filter);
/**
* Find the specified class or interface within the context of this class doc.
* Search order: 1) qualified name, 2) nested in this class or interface,
* 3) in this package, 4) in the class imports, 5) in the package imports.
* Return the ClassDoc if found, null if not found.
*/
ClassDoc findClass(String className);
/**
* Get the list of classes and interfaces declared as imported.
* These are called "single-type-import declarations" in
* <cite>The Java™ Language Specification</cite>.
*
* @return an array of ClassDoc representing the imported classes.
*
* @deprecated Import declarations are implementation details that
* should not be exposed here. In addition, not all imported
* classes are imported through single-type-import declarations.
*/
@Deprecated
ClassDoc[] importedClasses();
/**
* Get the list of packages declared as imported.
* These are called "type-import-on-demand declarations" in
* <cite>The Java™ Language Specification</cite>.
*
* @return an array of PackageDoc representing the imported packages.
*
* @deprecated Import declarations are implementation details that
* should not be exposed here. In addition, this method's
* return type does not allow for all type-import-on-demand
* declarations to be returned.
*/
@Deprecated
PackageDoc[] importedPackages();
}
| 12,951 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
RootDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/RootDoc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents the root of the program structure information
* for one run of javadoc. From this root all other program
* structure information can be extracted.
* Also represents the command line information -- the
* packages, classes and options specified by the user.
*
* @since 1.2
* @author Robert Field
*/
public interface RootDoc extends Doc, DocErrorReporter {
/**
* Command line options.
* <p>
* For example, given:
* <pre>
* javadoc -foo this that -bar other ...</pre>
*
* this method will return:
* <pre>
* options()[0][0] = "-foo"
* options()[0][1] = "this"
* options()[0][2] = "that"
* options()[1][0] = "-bar"
* options()[1][1] = "other"</pre>
*
* @return an array of arrays of String.
*/
String[][] options();
/**
* Return the packages
* <a href="package-summary.html#included">specified</a>
* on the command line.
* If <code>-subpackages</code> and <code>-exclude</code> options
* are used, return all the non-excluded packages.
*
* @return packages specified on the command line.
*/
PackageDoc[] specifiedPackages();
/**
* Return the classes and interfaces
* <a href="package-summary.html#included">specified</a>
* as source file names on the command line.
*
* @return classes and interfaces specified on the command line.
*/
ClassDoc[] specifiedClasses();
/**
* Return the
* <a href="package-summary.html#included">included</a>
classes and interfaces in all packages.
*
* @return included classes and interfaces in all packages.
*/
ClassDoc[] classes();
/**
* Return a PackageDoc for the specified package name.
*
* @param name package name
*
* @return a PackageDoc holding the specified package, null if
* this package is not referenced.
*/
PackageDoc packageNamed(String name);
/**
* Return a ClassDoc for the specified class or interface name.
*
* @param qualifiedName
* <a href="package-summary.html#qualified">qualified</a>
* class or package name
*
* @return a ClassDoc holding the specified class, null if
* this class is not referenced.
*/
ClassDoc classNamed(String qualifiedName);
}
| 3,607 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AnnotationDesc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/AnnotationDesc.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents an annotation.
* An annotation associates a value with each element of an annotation type.
*
* @author Scott Seligman
* @since 1.5
*/
public interface AnnotationDesc {
/**
* Returns the annotation type of this annotation.
*
* @return the annotation type of this annotation.
*/
AnnotationTypeDoc annotationType();
/**
* Returns this annotation's elements and their values.
* Only those explicitly present in the annotation are
* included, not those assuming their default values.
* Returns an empty array if there are none.
*
* @return this annotation's elements and their values.
*/
ElementValuePair[] elementValues();
/**
* Represents an association between an annotation type element
* and one of its values.
*
* @author Scott Seligman
* @since 1.5
*/
public interface ElementValuePair {
/**
* Returns the annotation type element.
*
* @return the annotation type element.
*/
AnnotationTypeElementDoc element();
/**
* Returns the value associated with the annotation type element.
*
* @return the value associated with the annotation type element.
*/
AnnotationValue value();
}
}
| 2,568 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Doc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/Doc.java | /*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
import java.text.BreakIterator;
import java.util.Locale;
/**
* Represents Java language constructs (package, class, constructor,
* method, field) which have comments and have been processed by this
* run of javadoc. All Doc objects are unique, that is, they
* are == comparable.
*
* @since 1.2
* @author Robert Field
* @author Scott Seligman (generics, enums, annotations)
*/
public interface Doc extends Comparable<Object> {
/**
* Return the text of the comment for this doc item.
* Tags have been removed.
*/
String commentText();
/**
* Return all tags in this Doc item.
*
* @return an array of {@link Tag} objects containing all tags on
* this Doc item.
*/
Tag[] tags();
/**
* Return tags of the specified {@linkplain Tag#kind() kind} in
* this Doc item.
*
* For example, if 'tagname' has value "@serial", all tags in
* this Doc item of kind "@serial" will be returned.
*
* @param tagname name of the tag kind to search for.
* @return an array of Tag containing all tags whose 'kind()'
* matches 'tagname'.
*/
Tag[] tags(String tagname);
/**
* Return the see also tags in this Doc item.
*
* @return an array of SeeTag containing all @see tags.
*/
SeeTag[] seeTags();
/**
* Return comment as an array of tags. Includes inline tags
* (i.e. {@link <i>reference</i>} tags) but not
* block tags.
* Each section of plain text is represented as a {@link Tag}
* of {@linkplain Tag#kind() kind} "Text".
* Inline tags are represented as a {@link SeeTag} of kind "@see"
* and name "@link".
*
* @return an array of {@link Tag}s representing the comment
*/
Tag[] inlineTags();
/**
* Return the first sentence of the comment as an array of tags.
* Includes inline tags
* (i.e. {@link <i>reference</i>} tags) but not
* block tags.
* Each section of plain text is represented as a {@link Tag}
* of {@linkplain Tag#kind() kind} "Text".
* Inline tags are represented as a {@link SeeTag} of kind "@see"
* and name "@link".
* <p>
* If the locale is English language, the first sentence is
* determined by the rules described in the Java Language
* Specification (first version): "This sentence ends
* at the first period that is followed by a blank, tab, or
* line terminator or at the first tagline.", in
* addition a line will be terminated by block
* HTML tags: <p> </p> <h1>
* <h2> <h3> <h4> <h5> <h6>
* <hr> <pre> or </pre>.
* If the locale is not English, the sentence end will be
* determined by
* {@link BreakIterator#getSentenceInstance(Locale)}.
* @return an array of {@link Tag}s representing the
* first sentence of the comment
*/
Tag[] firstSentenceTags();
/**
* Return the full unprocessed text of the comment. Tags
* are included as text. Used mainly for store and retrieve
* operations like internalization.
*/
String getRawCommentText();
/**
* Set the full unprocessed text of the comment. Tags
* are included as text. Used mainly for store and retrieve
* operations like internalization.
*/
void setRawCommentText(String rawDocumentation);
/**
* Returns the non-qualified name of this Doc item.
*
* @return the name
*/
String name();
/**
* Compares this doc object with the specified object for order. Returns a
* negative integer, zero, or a positive integer as this doc object is less
* than, equal to, or greater than the given object.
* <p>
* This method satisfies the {@link java.lang.Comparable} interface.
*
* @param obj the <code>Object</code> to be compared.
* @return a negative integer, zero, or a positive integer as this Object
* is less than, equal to, or greater than the given Object.
* @exception ClassCastException the specified Object's type prevents it
* from being compared to this Object.
*/
int compareTo(Object obj);
/**
* Is this Doc item a field (but not an enum constant)?
*
* @return true if it represents a field
*/
boolean isField();
/**
* Is this Doc item an enum constant?
*
* @return true if it represents an enum constant
* @since 1.5
*/
boolean isEnumConstant();
/**
* Is this Doc item a constructor?
*
* @return true if it represents a constructor
*/
boolean isConstructor();
/**
* Is this Doc item a method (but not a constructor or annotation
* type element)?
*
* @return true if it represents a method
*/
boolean isMethod();
/**
* Is this Doc item an annotation type element?
*
* @return true if it represents an annotation type element
* @since 1.5
*/
boolean isAnnotationTypeElement();
/**
* Is this Doc item an interface (but not an annotation type)?
*
* @return true if it represents an interface
*/
boolean isInterface();
/**
* Is this Doc item an exception class?
*
* @return true if it represents an exception
*/
boolean isException();
/**
* Is this Doc item an error class?
*
* @return true if it represents a error
*/
boolean isError();
/**
* Is this Doc item an enum type?
*
* @return true if it represents an enum type
* @since 1.5
*/
boolean isEnum();
/**
* Is this Doc item an annotation type?
*
* @return true if it represents an annotation type
* @since 1.5
*/
boolean isAnnotationType();
/**
* Is this Doc item an
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">ordinary
* class</a>?
* (i.e. not an interface, annotation type, enum, exception, or error)?
*
* @return true if it represents an ordinary class
*/
boolean isOrdinaryClass();
/**
* Is this Doc item a
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#class">class</a>
* (and not an interface or annotation type)?
* This includes ordinary classes, enums, errors and exceptions.
*
* @return true if it represents a class
*/
boolean isClass();
/**
* Return true if this Doc item is
* <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">included</a>
* in the result set.
*/
boolean isIncluded();
/**
* Return the source position of the first line of the
* corresponding declaration, or null if
* no position is available. A default constructor returns
* null because it has no location in the source file.
*
* @since 1.4
*/
SourcePosition position();
}
| 8,248 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ParameterizedType.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/ParameterizedType.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents an invocation of a generic class or interface. For example,
* given the generic interface {@code List<E>}, possible invocations
* include:
* <pre>
* {@code List<String>}
* {@code List<T extends Number>}
* {@code List<?>}
* </pre>
* A generic inner class {@code Outer<T>.Inner<S>} might be invoked as:
* <pre>
* {@code Outer<Number>.Inner<String>}
* </pre>
*
* @author Scott Seligman
* @since 1.5
*/
public interface ParameterizedType extends Type {
/**
* Return the generic class or interface that declared this type.
*
* @return the generic class or interface that declared this type.
*/
ClassDoc asClassDoc();
/**
* Return the actual type arguments of this type.
* For a generic type that is nested within some other generic type
* (such as {@code Outer<T>.Inner<S>}),
* only the type arguments of the innermost type are included.
*
* @return the actual type arguments of this type.
*/
Type[] typeArguments();
/**
* Return the class type that is a direct supertype of this one.
* This is the superclass of this type's declaring class,
* with type arguments substituted in.
* Return null if this is an interface type.
*
* <p> For example, if this parameterized type is
* {@code java.util.ArrayList<String>}, the result will be
* {@code java.util.AbstractList<String>}.
*
* @return the class type that is a direct supertype of this one.
*/
Type superclassType();
/**
* Return the interface types directly implemented by or extended by this
* parameterized type.
* These are the interfaces directly implemented or extended
* by this type's declaring class or interface,
* with type arguments substituted in.
* Return an empty array if there are no interfaces.
*
* <p> For example, the interface extended by
* {@code java.util.Set<String>} is {@code java.util.Collection<String>}.
*
* @return the interface types directly implemented by or extended by this
* parameterized type.
*/
Type[] interfaceTypes();
/**
* Return the type that contains this type as a member.
* Return null is this is a top-level type.
*
* <p> For example, the containing type of
* {@code AnInterface.Nested<Number>} is the <code>ClassDoc</code>
* representing {@code AnInterface}, and the containing type of
* {@code Outer<String>.Inner<Number>} is the
* <code>ParameterizedType</code> representing {@code Outer<String>}.
*
* @return the type that contains this type as a member.
*/
Type containingType();
}
| 3,950 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AnnotationTypeDoc.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/javadoc/AnnotationTypeDoc.java | /*
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.javadoc;
/**
* Represents an annotation type.
*
* @author Scott Seligman
* @since 1.5
*/
public interface AnnotationTypeDoc extends ClassDoc {
/**
* Returns the elements of this annotation type.
* Returns an empty array if there are none.
*
* @return the elements of this annotation type.
*/
AnnotationTypeElementDoc[] elements();
}
| 1,604 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AnnotationTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/AnnotationTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for an annotation.
*
* For example:
* <pre>
* {@code @}<em>annotationType</em>
* {@code @}<em>annotationType</em> ( <em>arguments</em> )
* </pre>
*
* @jls section 9.7
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface AnnotationTree extends ExpressionTree {
Tree getAnnotationType();
List<? extends ExpressionTree> getArguments();
}
| 1,693 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ClassTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ClassTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
import javax.lang.model.element.Name;
/**
* A tree node for a class, interface, enum, or annotation
* type declaration.
*
* For example:
* <pre>
* <em>modifiers</em> class <em>simpleName</em> <em>typeParameters</em>
* extends <em>extendsClause</em>
* implements <em>implementsClause</em>
* {
* <em>members</em>
* }
* </pre>
*
* @jls sections 8.1, 8.9, 9.1, and 9.6
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ClassTree extends StatementTree {
ModifiersTree getModifiers();
Name getSimpleName();
List<? extends TypeParameterTree> getTypeParameters();
Tree getExtendsClause();
List<? extends Tree> getImplementsClause();
List<? extends Tree> getMembers();
}
| 2,044 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
IfTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/IfTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an 'if' statement.
*
* For example:
* <pre>
* if ( <em>condition</em> )
* <em>thenStatement</em>
*
* if ( <em>condition</em> )
* <em>thenStatement</em>
* else
* <em>elseStatement</em>
* </pre>
*
* @jls section 14.9
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface IfTree extends StatementTree {
ExpressionTree getCondition();
StatementTree getThenStatement();
/**
* @return null if this if statement has no else branch.
*/
StatementTree getElseStatement();
}
| 1,835 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NewArrayTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/NewArrayTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for an expression to create a new instance of an array.
*
* For example:
* <pre>
* new <em>type</em> <em>dimensions</em> <em>initializers</em>
*
* new <em>type</em> <em>dimensions</em> [ ] <em>initializers</em>
* </pre>
*
* @jls section 15.10
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface NewArrayTree extends ExpressionTree {
Tree getType();
List<? extends ExpressionTree> getDimensions();
List<? extends ExpressionTree> getInitializers();
}
| 1,805 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ParameterizedTypeTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ParameterizedTypeTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a type expression involving type parameters.
*
* For example:
* <pre>
* <em>type</em> < <em>typeArguments</em> >
* </pre>
*
* @jls section 4.5.1
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ParameterizedTypeTree extends Tree {
Tree getType();
List<? extends Tree> getTypeArguments();
}
| 1,651 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
package-info.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/package-info.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 interfaces to represent source code as abstract syntax
* trees (AST).
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
package com.sun.source.tree;
| 1,409 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
UnaryTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/UnaryTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for postfix and unary expressions.
* Use {@link #getKind getKind} to determine the kind of operator.
*
* For example:
* <pre>
* <em>operator</em> <em>expression</em>
*
* <em>expression</em> <em>operator</em>
* </pre>
*
* @jls sections 15.14 and 15.15
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface UnaryTree extends ExpressionTree {
ExpressionTree getExpression();
}
| 1,697 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TypeCastTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/TypeCastTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a type cast expression.
*
* For example:
* <pre>
* ( <em>type</em> ) <em>expression</em>
* </pre>
*
* @jls section 15.16
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface TypeCastTree extends ExpressionTree {
Tree getType();
ExpressionTree getExpression();
}
| 1,589 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ExpressionStatementTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ExpressionStatementTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an expression statement.
*
* For example:
* <pre>
* <em>expression</em> ;
* </pre>
*
* @jls section 14.8
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ExpressionStatementTree extends StatementTree {
ExpressionTree getExpression();
}
| 1,563 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ErroneousTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ErroneousTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node to stand in for a malformed expression.
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ErroneousTree extends ExpressionTree {
List<? extends Tree> getErrorTrees();
}
| 1,512 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
WhileLoopTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/WhileLoopTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a 'while' loop statement.
*
* For example:
* <pre>
* while ( <em>condition</em> )
* <em>statement</em>
* </pre>
*
*
* @jls section 14.12
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface WhileLoopTree extends StatementTree {
ExpressionTree getCondition();
StatementTree getStatement();
}
| 1,624 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AssignmentTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/AssignmentTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an assignment expression.
*
* For example:
* <pre>
* <em>variable</em> = <em>expression</em>
* </pre>
*
* @jls section 15.26.1
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface AssignmentTree extends ExpressionTree {
ExpressionTree getVariable();
ExpressionTree getExpression();
}
| 1,611 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
VariableTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/VariableTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import javax.lang.model.element.Name;
/**
* A tree node for a variable declaration.
*
* For example:
* <pre>
* <em>modifiers</em> <em>type</em> <em>name</em> <em>initializer</em> ;
* </pre>
*
* @jls sections 8.3 and 14.4
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface VariableTree extends StatementTree {
ModifiersTree getModifiers();
Name getName();
Tree getType();
ExpressionTree getInitializer();
}
| 1,728 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
LineMap.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/LineMap.java | /*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* Provides methods to convert between character positions and line numbers
* for a compilation unit.
*
* @since 1.6
*/
public interface LineMap {
/**
* Find the start position of a line.
*
* @param line line number (beginning at 1)
* @return position of first character in line
* @throws IndexOutOfBoundsException
* if <tt>lineNumber < 1</tt>
* if <tt>lineNumber > no. of lines</tt>
*/
long getStartPosition(long line);
/**
* Find the position corresponding to a (line,column).
*
* @param line line number (beginning at 1)
* @param column tab-expanded column number (beginning 1)
*
* @return position of character
* @throws IndexOutOfBoundsException
* if {@code line < 1}
* if {@code line > no. of lines}
*/
long getPosition(long line, long column);
/**
* Find the line containing a position; a line termination
* character is on the line it terminates.
*
* @param pos character offset of the position
* @return the line number of pos (first line is 1)
*/
long getLineNumber(long pos);
/**
* Find the column for a character position.
* Tab characters preceding the position on the same line
* will be expanded when calculating the column number.
*
* @param pos character offset of the position
* @return the tab-expanded column number of pos (first column is 1)
*/
long getColumnNumber(long pos);
}
| 2,804 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
BinaryTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/BinaryTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a binary expression.
* Use {@link #getKind getKind} to determine the kind of operator.
*
* For example:
* <pre>
* <em>leftOperand</em> <em>operator</em> <em>rightOperand</em>
* </pre>
*
* @jls sections 15.17 to 15.24
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface BinaryTree extends ExpressionTree {
ExpressionTree getLeftOperand();
ExpressionTree getRightOperand();
}
| 1,703 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
LiteralTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/LiteralTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a literal expression.
* Use {@link #getKind getKind} to determine the kind of literal.
*
* For example:
* <pre>
* <em>value</em>
* </pre>
*
* @jls section 15.28
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface LiteralTree extends ExpressionTree {
Object getValue();
}
| 1,596 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CompoundAssignmentTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/CompoundAssignmentTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for compound assignment operator.
* Use {@link #getKind getKind} to determine the kind of operator.
*
* For example:
* <pre>
* <em>variable</em> <em>operator</em> <em>expression</em>
* </pre>
*
* @jls section 15.26.2
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface CompoundAssignmentTree extends ExpressionTree {
ExpressionTree getVariable();
ExpressionTree getExpression();
}
| 1,706 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TypeParameterTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/TypeParameterTree.java | /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
import javax.lang.model.element.Name;
/**
* A tree node for a type parameter.
*
* For example:
* <pre>
* <em>name</em>
*
* <em>name</em> extends <em>bounds</em>
* </pre>
*
* @jls section 4.4
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface TypeParameterTree extends Tree {
Name getName();
List<? extends Tree> getBounds();
}
| 1,668 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
MemberSelectTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/MemberSelectTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import javax.lang.model.element.Name;
/**
* A tree node for a member access expression.
*
* For example:
* <pre>
* <em>expression</em> . <em>identifier</em>
* </pre>
*
* @jls sections 6.5, 15.11,and 15.12
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface MemberSelectTree extends ExpressionTree {
ExpressionTree getExpression();
Name getIdentifier();
}
| 1,668 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
AssertTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/AssertTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an 'assert' statement.
*
* For example:
* <pre>
* assert <em>condition</em> ;
*
* assert <em>condition</em> : <em>detail</em> ;
* </pre>
*
* @jls section 14.10
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface AssertTree extends StatementTree {
ExpressionTree getCondition();
ExpressionTree getDetail();
}
| 1,640 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Scope.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/Scope.java | /*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import com.sun.source.tree.Tree;
import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
/**
* Interface for determining locally available program elements, such as
* local variables and imports.
* Upon creation, a Scope is associated with a given program position;
* for example, a {@linkplain Tree tree node}. This position may be used to
* infer an enclosing method and/or class.
*
* <p>A Scope does not itself contain the details of the elements corresponding
* to the parameters, methods and fields of the methods and classes containing
* its position. However, these elements can be determined from the enclosing
* elements.
*
* <p>Scopes may be contained in an enclosing scope. The outermost scope contains
* those elements available via "star import" declarations; the scope within that
* contains the top level elements of the compilation unit, including any named
* imports.
*
* @since 1.6
*/
public interface Scope {
/**
* Returns the enclosing scope.
*/
public Scope getEnclosingScope();
/**
* Returns the innermost type element containing the position of this scope
*/
public TypeElement getEnclosingClass();
/**
* Returns the innermost executable element containing the position of this scope.
*/
public ExecutableElement getEnclosingMethod();
/**
* Returns the elements directly contained in this scope.
*/
public Iterable<? extends Element> getLocalElements();
}
| 2,835 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
DoWhileLoopTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/DoWhileLoopTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a 'do' statement.
*
* For example:
* <pre>
* do
* <em>statement</em>
* while ( <em>expression</em> );
* </pre>
*
* @jls section 14.13
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface DoWhileLoopTree extends StatementTree {
ExpressionTree getCondition();
StatementTree getStatement();
}
| 1,627 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ConditionalExpressionTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ConditionalExpressionTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for the conditional operator ? :.
*
* For example:
* <pre>
* <em>condition</em> ? <em>trueExpression</em> : <em>falseExpression</em>
* </pre>
*
* @jls section 15.25
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ConditionalExpressionTree extends ExpressionTree {
ExpressionTree getCondition();
ExpressionTree getTrueExpression();
ExpressionTree getFalseExpression();
}
| 1,702 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ParenthesizedTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ParenthesizedTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a parenthesized expression. Note: parentheses
* not be preserved by the parser.
*
* For example:
* <pre>
* ( <em>expression</em> )
* </pre>
*
* @jls section 15.8.5
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ParenthesizedTree extends ExpressionTree {
ExpressionTree getExpression();
}
| 1,619 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ExpressionTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ExpressionTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node used as the base class for the different types of
* expressions.
*
* @jls chapter 15
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ExpressionTree extends Tree {}
| 1,478 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
MethodInvocationTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/MethodInvocationTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a method invocation expression.
*
* For example:
* <pre>
* <em>identifier</em> ( <em>arguments</em> )
*
* this . <em>typeArguments</em> <em>identifier</em> ( <em>arguments</em> )
* </pre>
*
* @jls section 15.12
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface MethodInvocationTree extends ExpressionTree {
List<? extends Tree> getTypeArguments();
ExpressionTree getMethodSelect();
List<? extends ExpressionTree> getArguments();
}
| 1,793 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
StatementTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/StatementTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node used as the base class for the different kinds of
* statements.
*
* @jls chapter 14
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface StatementTree extends Tree {}
| 1,476 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ArrayAccessTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ArrayAccessTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an array access expression.
*
* For example:
* <pre>
* <em>expression</em> [ <em>index</em> ]
* </pre>
*
* @jls section 15.13
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ArrayAccessTree extends ExpressionTree {
ExpressionTree getExpression();
ExpressionTree getIndex();
}
| 1,608 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SynchronizedTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/SynchronizedTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a 'synchronized' statement.
*
* For example:
* <pre>
* synchronized ( <em>expression</em> )
* <em>block</em>
* </pre>
*
* @jls section 14.19
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface SynchronizedTree extends StatementTree {
ExpressionTree getExpression();
BlockTree getBlock();
}
| 1,625 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
InstanceOfTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/InstanceOfTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an 'instanceof' expression.
*
* For example:
* <pre>
* <em>expression</em> instanceof <em>type</em>
* </pre>
*
* @jls section 15.20.2
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface InstanceOfTree extends ExpressionTree {
ExpressionTree getExpression();
Tree getType();
}
| 1,604 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
EnhancedForLoopTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an "enhanced" 'for' loop statement.
*
* For example:
* <pre>
* for ( <em>variable</em> : <em>expression</em> )
* <em>statement</em>
* </pre>
*
* @jls section 14.14.2
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface EnhancedForLoopTree extends StatementTree {
VariableTree getVariable();
ExpressionTree getExpression();
StatementTree getStatement();
}
| 1,699 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ArrayTypeTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ArrayTypeTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an array type.
*
* For example:
* <pre>
* <em>type</em> []
* </pre>
*
* @jls section 10.1
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ArrayTypeTree extends Tree {
Tree getType();
}
| 1,513 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ThrowTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ThrowTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a 'throw' statement.
*
* For example:
* <pre>
* throw <em>expression</em>;
* </pre>
*
* @jls section 14.18
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ThrowTree extends StatementTree {
ExpressionTree getExpression();
}
| 1,551 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ImportTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ImportTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an import statement.
*
* For example:
* <pre>
* import <em>qualifiedIdentifier</em> ;
*
* static import <em>qualifiedIdentifier</em> ;
* </pre>
*
* @jls section 7.5
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ImportTree extends Tree {
boolean isStatic();
/**
* @return a qualified identifier ending in "*" if and only if
* this is an import-on-demand.
*/
Tree getQualifiedIdentifier();
}
| 1,747 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ReturnTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ReturnTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a 'return' statement.
*
* For example:
* <pre>
* return;
* return <em>expression</em>;
* </pre>
*
* @jls section 14.17
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ReturnTree extends StatementTree {
ExpressionTree getExpression();
}
| 1,567 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
UnionTypeTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/UnionTypeTree.java | /*
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a union type expression in a multicatch var declaration.
*
* @author Maurizio Cimadamore
*
* @since 1.7
*/
public interface UnionTypeTree extends Tree {
List<? extends Tree> getTypeAlternatives();
}
| 1,499 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
IdentifierTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/IdentifierTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import javax.lang.model.element.Name;
/**
* A tree node for an identifier expression.
*
* For example:
* <pre>
* <em>name</em>
* </pre>
*
* @jls section 6.5.6.1
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface IdentifierTree extends ExpressionTree {
Name getName();
}
| 1,580 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
SwitchTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/SwitchTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a 'switch' statement.
*
* For example:
* <pre>
* switch ( <em>expression</em> ) {
* <em>cases</em>
* }
* </pre>
*
* @jls section 14.11
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface SwitchTree extends StatementTree {
ExpressionTree getExpression();
List<? extends CaseTree> getCases();
}
| 1,653 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ModifiersTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ModifiersTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
import java.util.Set;
import javax.lang.model.element.Modifier;
/**
* A tree node for the modifiers, including annotations, for a declaration.
*
* For example:
* <pre>
* <em>flags</em>
*
* <em>flags</em> <em>annotations</em>
* </pre>
*
* @jls sections 8.1.1, 8.3.1, 8.4.3, 8.5.1, 8.8.3, 9.1.1, and 9.7
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ModifiersTree extends Tree {
Set<Modifier> getFlags();
List<? extends AnnotationTree> getAnnotations();
}
| 1,794 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CatchTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/CatchTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a 'catch' block in a 'try' statement.
*
* For example:
* <pre>
* catch ( <em>parameter</em> )
* <em>block</em>
* </pre>
*
* @jls section 14.20
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface CatchTree extends Tree {
VariableTree getParameter();
BlockTree getBlock();
}
| 1,608 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TreeVisitor.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/TreeVisitor.java | /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A visitor of trees, in the style of the visitor design pattern.
* Classes implementing this interface are used to operate
* on a tree when the kind of tree is unknown at compile time.
* When a visitor is passed to an tree's {@link Tree#accept
* accept} method, the <tt>visit<i>XYZ</i></tt> method most applicable
* to that tree is invoked.
*
* <p> Classes implementing this interface may or may not throw a
* {@code NullPointerException} if the additional parameter {@code p}
* is {@code null}; see documentation of the implementing class for
* details.
*
* <p> <b>WARNING:</b> It is possible that methods will be added to
* this interface to accommodate new, currently unknown, language
* structures added to future versions of the Java™ programming
* language. Therefore, visitor classes directly implementing this
* interface may be source incompatible with future versions of the
* platform.
*
* @param <R> the return type of this visitor's methods. Use {@link
* Void} for visitors that do not need to return results.
* @param <P> the type of the additional parameter to this visitor's
* methods. Use {@code Void} for visitors that do not need an
* additional parameter.
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
*
* @since 1.6
*/
public interface TreeVisitor<R,P> {
R visitAnnotation(AnnotationTree node, P p);
R visitMethodInvocation(MethodInvocationTree node, P p);
R visitAssert(AssertTree node, P p);
R visitAssignment(AssignmentTree node, P p);
R visitCompoundAssignment(CompoundAssignmentTree node, P p);
R visitBinary(BinaryTree node, P p);
R visitBlock(BlockTree node, P p);
R visitBreak(BreakTree node, P p);
R visitCase(CaseTree node, P p);
R visitCatch(CatchTree node, P p);
R visitClass(ClassTree node, P p);
R visitConditionalExpression(ConditionalExpressionTree node, P p);
R visitContinue(ContinueTree node, P p);
R visitDoWhileLoop(DoWhileLoopTree node, P p);
R visitErroneous(ErroneousTree node, P p);
R visitExpressionStatement(ExpressionStatementTree node, P p);
R visitEnhancedForLoop(EnhancedForLoopTree node, P p);
R visitForLoop(ForLoopTree node, P p);
R visitIdentifier(IdentifierTree node, P p);
R visitIf(IfTree node, P p);
R visitImport(ImportTree node, P p);
R visitArrayAccess(ArrayAccessTree node, P p);
R visitLabeledStatement(LabeledStatementTree node, P p);
R visitLiteral(LiteralTree node, P p);
R visitMethod(MethodTree node, P p);
R visitModifiers(ModifiersTree node, P p);
R visitNewArray(NewArrayTree node, P p);
R visitNewClass(NewClassTree node, P p);
R visitParenthesized(ParenthesizedTree node, P p);
R visitReturn(ReturnTree node, P p);
R visitMemberSelect(MemberSelectTree node, P p);
R visitEmptyStatement(EmptyStatementTree node, P p);
R visitSwitch(SwitchTree node, P p);
R visitSynchronized(SynchronizedTree node, P p);
R visitThrow(ThrowTree node, P p);
R visitCompilationUnit(CompilationUnitTree node, P p);
R visitTry(TryTree node, P p);
R visitParameterizedType(ParameterizedTypeTree node, P p);
R visitUnionType(UnionTypeTree node, P p);
R visitArrayType(ArrayTypeTree node, P p);
R visitTypeCast(TypeCastTree node, P p);
R visitPrimitiveType(PrimitiveTypeTree node, P p);
R visitTypeParameter(TypeParameterTree node, P p);
R visitInstanceOf(InstanceOfTree node, P p);
R visitUnary(UnaryTree node, P p);
R visitVariable(VariableTree node, P p);
R visitWhileLoop(WhileLoopTree node, P p);
R visitWildcard(WildcardTree node, P p);
R visitOther(Tree node, P p);
}
| 4,959 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ForLoopTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ForLoopTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a basic 'for' loop statement.
*
* For example:
* <pre>
* for ( <em>initializer</em> ; <em>condition</em> ; <em>update</em> )
* <em>statement</em>
* </pre>
*
* @jls section 14.14.1
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ForLoopTree extends StatementTree {
List<? extends StatementTree> getInitializer();
ExpressionTree getCondition();
List<? extends ExpressionStatementTree> getUpdate();
StatementTree getStatement();
}
| 1,799 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Tree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/Tree.java | /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* Common interface for all nodes in an abstract syntax tree.
*
* <p><b>WARNING:</b> This interface and its sub-interfaces are
* subject to change as the Java™ programming language evolves.
* These interfaces are implemented by the JDK Java compiler (javac)
* and should not be implemented either directly or indirectly by
* other applications.
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
*
* @since 1.6
*/
public interface Tree {
/**
* Enumerates all kinds of trees.
*/
public enum Kind {
/**
* Used for instances of {@link AnnotationTree}.
*/
ANNOTATION(AnnotationTree.class),
/**
* Used for instances of {@link ArrayAccessTree}.
*/
ARRAY_ACCESS(ArrayAccessTree.class),
/**
* Used for instances of {@link ArrayTypeTree}.
*/
ARRAY_TYPE(ArrayTypeTree.class),
/**
* Used for instances of {@link AssertTree}.
*/
ASSERT(AssertTree.class),
/**
* Used for instances of {@link AssignmentTree}.
*/
ASSIGNMENT(AssignmentTree.class),
/**
* Used for instances of {@link BlockTree}.
*/
BLOCK(BlockTree.class),
/**
* Used for instances of {@link BreakTree}.
*/
BREAK(BreakTree.class),
/**
* Used for instances of {@link CaseTree}.
*/
CASE(CaseTree.class),
/**
* Used for instances of {@link CatchTree}.
*/
CATCH(CatchTree.class),
/**
* Used for instances of {@link ClassTree} representing classes.
*/
CLASS(ClassTree.class),
/**
* Used for instances of {@link CompilationUnitTree}.
*/
COMPILATION_UNIT(CompilationUnitTree.class),
/**
* Used for instances of {@link ConditionalExpressionTree}.
*/
CONDITIONAL_EXPRESSION(ConditionalExpressionTree.class),
/**
* Used for instances of {@link ContinueTree}.
*/
CONTINUE(ContinueTree.class),
/**
* Used for instances of {@link DoWhileLoopTree}.
*/
DO_WHILE_LOOP(DoWhileLoopTree.class),
/**
* Used for instances of {@link EnhancedForLoopTree}.
*/
ENHANCED_FOR_LOOP(EnhancedForLoopTree.class),
/**
* Used for instances of {@link ExpressionStatementTree}.
*/
EXPRESSION_STATEMENT(ExpressionStatementTree.class),
/**
* Used for instances of {@link MemberSelectTree}.
*/
MEMBER_SELECT(MemberSelectTree.class),
/**
* Used for instances of {@link ForLoopTree}.
*/
FOR_LOOP(ForLoopTree.class),
/**
* Used for instances of {@link IdentifierTree}.
*/
IDENTIFIER(IdentifierTree.class),
/**
* Used for instances of {@link IfTree}.
*/
IF(IfTree.class),
/**
* Used for instances of {@link ImportTree}.
*/
IMPORT(ImportTree.class),
/**
* Used for instances of {@link InstanceOfTree}.
*/
INSTANCE_OF(InstanceOfTree.class),
/**
* Used for instances of {@link LabeledStatementTree}.
*/
LABELED_STATEMENT(LabeledStatementTree.class),
/**
* Used for instances of {@link MethodTree}.
*/
METHOD(MethodTree.class),
/**
* Used for instances of {@link MethodInvocationTree}.
*/
METHOD_INVOCATION(MethodInvocationTree.class),
/**
* Used for instances of {@link ModifiersTree}.
*/
MODIFIERS(ModifiersTree.class),
/**
* Used for instances of {@link NewArrayTree}.
*/
NEW_ARRAY(NewArrayTree.class),
/**
* Used for instances of {@link NewClassTree}.
*/
NEW_CLASS(NewClassTree.class),
/**
* Used for instances of {@link ParenthesizedTree}.
*/
PARENTHESIZED(ParenthesizedTree.class),
/**
* Used for instances of {@link PrimitiveTypeTree}.
*/
PRIMITIVE_TYPE(PrimitiveTypeTree.class),
/**
* Used for instances of {@link ReturnTree}.
*/
RETURN(ReturnTree.class),
/**
* Used for instances of {@link EmptyStatementTree}.
*/
EMPTY_STATEMENT(EmptyStatementTree.class),
/**
* Used for instances of {@link SwitchTree}.
*/
SWITCH(SwitchTree.class),
/**
* Used for instances of {@link SynchronizedTree}.
*/
SYNCHRONIZED(SynchronizedTree.class),
/**
* Used for instances of {@link ThrowTree}.
*/
THROW(ThrowTree.class),
/**
* Used for instances of {@link TryTree}.
*/
TRY(TryTree.class),
/**
* Used for instances of {@link ParameterizedTypeTree}.
*/
PARAMETERIZED_TYPE(ParameterizedTypeTree.class),
/**
* Used for instances of {@link UnionTypeTree}.
*/
UNION_TYPE(UnionTypeTree.class),
/**
* Used for instances of {@link TypeCastTree}.
*/
TYPE_CAST(TypeCastTree.class),
/**
* Used for instances of {@link TypeParameterTree}.
*/
TYPE_PARAMETER(TypeParameterTree.class),
/**
* Used for instances of {@link VariableTree}.
*/
VARIABLE(VariableTree.class),
/**
* Used for instances of {@link WhileLoopTree}.
*/
WHILE_LOOP(WhileLoopTree.class),
/**
* Used for instances of {@link UnaryTree} representing postfix
* increment operator {@code ++}.
*/
POSTFIX_INCREMENT(UnaryTree.class),
/**
* Used for instances of {@link UnaryTree} representing postfix
* decrement operator {@code --}.
*/
POSTFIX_DECREMENT(UnaryTree.class),
/**
* Used for instances of {@link UnaryTree} representing prefix
* increment operator {@code ++}.
*/
PREFIX_INCREMENT(UnaryTree.class),
/**
* Used for instances of {@link UnaryTree} representing prefix
* decrement operator {@code --}.
*/
PREFIX_DECREMENT(UnaryTree.class),
/**
* Used for instances of {@link UnaryTree} representing unary plus
* operator {@code +}.
*/
UNARY_PLUS(UnaryTree.class),
/**
* Used for instances of {@link UnaryTree} representing unary minus
* operator {@code -}.
*/
UNARY_MINUS(UnaryTree.class),
/**
* Used for instances of {@link UnaryTree} representing bitwise
* complement operator {@code ~}.
*/
BITWISE_COMPLEMENT(UnaryTree.class),
/**
* Used for instances of {@link UnaryTree} representing logical
* complement operator {@code !}.
*/
LOGICAL_COMPLEMENT(UnaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* multiplication {@code *}.
*/
MULTIPLY(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* division {@code /}.
*/
DIVIDE(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* remainder {@code %}.
*/
REMAINDER(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* addition or string concatenation {@code +}.
*/
PLUS(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* subtraction {@code -}.
*/
MINUS(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* left shift {@code <<}.
*/
LEFT_SHIFT(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* right shift {@code >>}.
*/
RIGHT_SHIFT(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* unsigned right shift {@code >>>}.
*/
UNSIGNED_RIGHT_SHIFT(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* less-than {@code <}.
*/
LESS_THAN(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* greater-than {@code >}.
*/
GREATER_THAN(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* less-than-equal {@code <=}.
*/
LESS_THAN_EQUAL(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* greater-than-equal {@code >=}.
*/
GREATER_THAN_EQUAL(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* equal-to {@code ==}.
*/
EQUAL_TO(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* not-equal-to {@code !=}.
*/
NOT_EQUAL_TO(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* bitwise and logical "and" {@code &}.
*/
AND(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* bitwise and logical "xor" {@code ^}.
*/
XOR(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* bitwise and logical "or" {@code |}.
*/
OR(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* conditional-and {@code &&}.
*/
CONDITIONAL_AND(BinaryTree.class),
/**
* Used for instances of {@link BinaryTree} representing
* conditional-or {@code ||}.
*/
CONDITIONAL_OR(BinaryTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* multiplication assignment {@code *=}.
*/
MULTIPLY_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* division assignment {@code /=}.
*/
DIVIDE_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* remainder assignment {@code %=}.
*/
REMAINDER_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* addition or string concatenation assignment {@code +=}.
*/
PLUS_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* subtraction assignment {@code -=}.
*/
MINUS_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* left shift assignment {@code <<=}.
*/
LEFT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* right shift assignment {@code >>=}.
*/
RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* unsigned right shift assignment {@code >>>=}.
*/
UNSIGNED_RIGHT_SHIFT_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* bitwise and logical "and" assignment {@code &=}.
*/
AND_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* bitwise and logical "xor" assignment {@code ^=}.
*/
XOR_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link CompoundAssignmentTree} representing
* bitwise and logical "or" assignment {@code |=}.
*/
OR_ASSIGNMENT(CompoundAssignmentTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* an integral literal expression of type {@code int}.
*/
INT_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* an integral literal expression of type {@code long}.
*/
LONG_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* a floating-point literal expression of type {@code float}.
*/
FLOAT_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* a floating-point literal expression of type {@code double}.
*/
DOUBLE_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* a boolean literal expression of type {@code boolean}.
*/
BOOLEAN_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* a character literal expression of type {@code char}.
*/
CHAR_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* a string literal expression of type {@link String}.
*/
STRING_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link LiteralTree} representing
* the use of {@code null}.
*/
NULL_LITERAL(LiteralTree.class),
/**
* Used for instances of {@link WildcardTree} representing
* an unbounded wildcard type argument.
*/
UNBOUNDED_WILDCARD(WildcardTree.class),
/**
* Used for instances of {@link WildcardTree} representing
* an extends bounded wildcard type argument.
*/
EXTENDS_WILDCARD(WildcardTree.class),
/**
* Used for instances of {@link WildcardTree} representing
* a super bounded wildcard type argument.
*/
SUPER_WILDCARD(WildcardTree.class),
/**
* Used for instances of {@link ErroneousTree}.
*/
ERRONEOUS(ErroneousTree.class),
/**
* Used for instances of {@link ClassTree} representing interfaces.
*/
INTERFACE(ClassTree.class),
/**
* Used for instances of {@link ClassTree} representing enums.
*/
ENUM(ClassTree.class),
/**
* Used for instances of {@link ClassTree} representing annotation types.
*/
ANNOTATION_TYPE(ClassTree.class),
/**
* An implementation-reserved node. This is the not the node
* you are looking for.
*/
OTHER(null);
Kind(Class<? extends Tree> intf) {
associatedInterface = intf;
}
public Class<? extends Tree> asInterface() {
return associatedInterface;
}
private final Class<? extends Tree> associatedInterface;
}
/**
* Gets the kind of this tree.
*
* @return the kind of this tree.
*/
Kind getKind();
/**
* Accept method used to implement the visitor pattern. The
* visitor pattern is used to implement operations on trees.
*
* @param <R> result type of this operation.
* @param <D> type of additonal data.
*/
<R,D> R accept(TreeVisitor<R,D> visitor, D data);
}
| 17,439 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
LabeledStatementTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/LabeledStatementTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import javax.lang.model.element.Name;
/**
* A tree node for a labeled statement.
*
* For example:
* <pre>
* <em>label</em> : <em>statement</em>
* </pre>
*
* @jls section 14.7
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface LabeledStatementTree extends StatementTree {
Name getLabel();
StatementTree getStatement();
}
| 1,634 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CompilationUnitTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
import javax.tools.JavaFileObject;
import com.sun.source.tree.LineMap;
/**
* Represents the abstract syntax tree for compilation units (source
* files) and package declarations (package-info.java).
*
* @jls sections 7.3, and 7.4
*
* @author Peter von der Ahé
* @since 1.6
*/
public interface CompilationUnitTree extends Tree {
List<? extends AnnotationTree> getPackageAnnotations();
ExpressionTree getPackageName();
List<? extends ImportTree> getImports();
List<? extends Tree> getTypeDecls();
JavaFileObject getSourceFile();
/**
* Gets the line map for this compilation unit, if available.
* Returns null if the line map is not available.
* @return the line map for this compilation unit
*/
LineMap getLineMap();
}
| 2,048 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TryTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/TryTree.java | /*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a 'try' statement.
*
* For example:
* <pre>
* try
* <em>block</em>
* <em>catches</em>
* finally
* <em>finallyBlock</em>
* </pre>
*
* @jls section 14.20
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface TryTree extends StatementTree {
BlockTree getBlock();
List<? extends CatchTree> getCatches();
BlockTree getFinallyBlock();
List<? extends Tree> getResources();
}
| 1,752 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
BreakTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/BreakTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import javax.lang.model.element.Name;
/**
* A tree node for a 'break' statement.
*
* For example:
* <pre>
* break;
*
* break <em>label</em> ;
* </pre>
*
* @jls section 14.15
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface BreakTree extends StatementTree {
Name getLabel();
}
| 1,592 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
CaseTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/CaseTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a 'case' in a 'switch' statement.
*
* For example:
* <pre>
* case <em>expression</em> :
* <em>statements</em>
*
* default :
* <em>statements</em>
* </pre>
*
* @jls section 14.11
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface CaseTree extends Tree {
/**
* @return null if and only if this Case is {@code default:}
*/
ExpressionTree getExpression();
List<? extends StatementTree> getStatements();
}
| 1,786 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
ContinueTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/ContinueTree.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import javax.lang.model.element.Name;
/**
* A tree node for a 'continue' statement.
*
* For example:
* <pre>
* continue;
* continue <em>label</em> ;
* </pre>
*
* @jls section 14.16
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface ContinueTree extends StatementTree {
Name getLabel();
}
| 1,601 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
MethodTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/MethodTree.java | /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
import javax.lang.model.element.Name;
/**
* A tree node for a method or annotation type element declaration.
*
* For example:
* <pre>
* <em>modifiers</em> <em>typeParameters</em> <em>type</em> <em>name</em>
* ( <em>parameters</em> )
* <em>body</em>
*
* <em>modifiers</em> <em>type</em> <em>name</em> () default <em>defaultValue</em>
* </pre>
*
* @jls sections 8.4, 8.6, 8.7, 9.4, and 9.6
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface MethodTree extends Tree {
ModifiersTree getModifiers();
Name getName();
Tree getReturnType();
List<? extends TypeParameterTree> getTypeParameters();
List<? extends VariableTree> getParameters();
List<? extends ExpressionTree> getThrows();
BlockTree getBody();
Tree getDefaultValue(); // for annotation types
}
| 2,126 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
EmptyStatementTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/EmptyStatementTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for an empty (skip) statement.
*
* For example:
* <pre>
* ;
* </pre>
*
* @jls section 14.6
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface EmptyStatementTree extends StatementTree {}
| 1,504 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
PrimitiveTypeTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/PrimitiveTypeTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import javax.lang.model.type.TypeKind;
/**
* A tree node for a primitive type.
*
* For example:
* <pre>
* <em>primitiveTypeKind</em>
* </pre>
*
* @jls section 4.2
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface PrimitiveTypeTree extends Tree {
TypeKind getPrimitiveTypeKind();
}
| 1,586 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
BlockTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/BlockTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node for a statement block.
*
* For example:
* <pre>
* { }
*
* { <em>statements</em> }
*
* static { <em>statements</em> }
* </pre>
*
* @jls section 14.2
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface BlockTree extends StatementTree {
boolean isStatic();
List<? extends StatementTree> getStatements();
}
| 1,659 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
NewClassTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/NewClassTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
import java.util.List;
/**
* A tree node to declare a new instance of a class.
*
* For example:
* <pre>
* new <em>identifier</em> ( )
*
* new <em>identifier</em> ( <em>arguments</em> )
*
* new <em>typeArguments</em> <em>identifier</em> ( <em>arguments</em> )
* <em>classBody</em>
*
* <em>enclosingExpression</em>.new <em>identifier</em> ( <em>arguments</em> )
* </pre>
*
* @jls section 15.9
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface NewClassTree extends ExpressionTree {
ExpressionTree getEnclosingExpression();
List<? extends Tree> getTypeArguments();
ExpressionTree getIdentifier();
List<? extends ExpressionTree> getArguments();
ClassTree getClassBody();
}
| 2,008 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
WildcardTree.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/tree/WildcardTree.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.tree;
/**
* A tree node for a wildcard type argument.
* Use {@link #getKind getKind} to determine the kind of bound.
*
* For example:
* <pre>
* ?
*
* ? extends <em>bound</em>
*
* ? super <em>bound</em>
* </pre>
*
* @jls section 4.5.1
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public interface WildcardTree extends Tree {
Tree getBound();
}
| 1,638 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TreeScanner.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/util/TreeScanner.java | /*
* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.util;
import com.sun.source.tree.*;
/**
* A TreeVisitor that visits all the child tree nodes.
* To visit nodes of a particular type, just override the
* corresponding visitXYZ method.
* Inside your method, call super.visitXYZ to visit descendant
* nodes.
*
* <p>The default implementation of the visitXYZ methods will determine
* a result as follows:
* <ul>
* <li>If the node being visited has no children, the result will be null.
* <li>If the node being visited has one child, the result will be the
* result of calling {@code scan} on that child. The child may be a simple node
* or itself a list of nodes.
* <li> If the node being visited has more than one child, the result will
* be determined by calling {@code scan} each child in turn, and then combining the
* result of each scan after the first with the cumulative result
* so far, as determined by the {@link #reduce} method. Each child may be either
* a simple node of a list of nodes. The default behavior of the {@code reduce}
* method is such that the result of the visitXYZ method will be the result of
* the last child scanned.
* </ul>
*
* <p>Here is an example to count the number of identifier nodes in a tree:
* <pre>
* class CountIdentifiers extends TreeScanner<Integer,Void> {
* {@literal @}Override
* public Integer visitIdentifier(IdentifierTree node, Void p) {
* return 1;
* }
* {@literal @}Override
* public Integer reduce(Integer r1, Integer r2) {
* return (r1 == null ? 0 : r1) + (r2 == null ? 0 : r2);
* }
* }
* </pre>
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
public class TreeScanner<R,P> implements TreeVisitor<R,P> {
/** Scan a single node.
*/
public R scan(Tree node, P p) {
return (node == null) ? null : node.accept(this, p);
}
private R scanAndReduce(Tree node, P p, R r) {
return reduce(scan(node, p), r);
}
/** Scan a list of nodes.
*/
public R scan(Iterable<? extends Tree> nodes, P p) {
R r = null;
if (nodes != null) {
boolean first = true;
for (Tree node : nodes) {
r = (first ? scan(node, p) : scanAndReduce(node, p, r));
first = false;
}
}
return r;
}
private R scanAndReduce(Iterable<? extends Tree> nodes, P p, R r) {
return reduce(scan(nodes, p), r);
}
/**
* Reduces two results into a combined result.
* The default implementation is to return the first parameter.
* The general contract of the method is that it may take any action whatsoever.
*/
public R reduce(R r1, R r2) {
return r1;
}
/* ***************************************************************************
* Visitor methods
****************************************************************************/
public R visitCompilationUnit(CompilationUnitTree node, P p) {
R r = scan(node.getPackageAnnotations(), p);
r = scanAndReduce(node.getPackageName(), p, r);
r = scanAndReduce(node.getImports(), p, r);
r = scanAndReduce(node.getTypeDecls(), p, r);
return r;
}
public R visitImport(ImportTree node, P p) {
return scan(node.getQualifiedIdentifier(), p);
}
public R visitClass(ClassTree node, P p) {
R r = scan(node.getModifiers(), p);
r = scanAndReduce(node.getTypeParameters(), p, r);
r = scanAndReduce(node.getExtendsClause(), p, r);
r = scanAndReduce(node.getImplementsClause(), p, r);
r = scanAndReduce(node.getMembers(), p, r);
return r;
}
public R visitMethod(MethodTree node, P p) {
R r = scan(node.getModifiers(), p);
r = scanAndReduce(node.getReturnType(), p, r);
r = scanAndReduce(node.getTypeParameters(), p, r);
r = scanAndReduce(node.getParameters(), p, r);
r = scanAndReduce(node.getThrows(), p, r);
r = scanAndReduce(node.getBody(), p, r);
r = scanAndReduce(node.getDefaultValue(), p, r);
return r;
}
public R visitVariable(VariableTree node, P p) {
R r = scan(node.getModifiers(), p);
r = scanAndReduce(node.getType(), p, r);
r = scanAndReduce(node.getInitializer(), p, r);
return r;
}
public R visitEmptyStatement(EmptyStatementTree node, P p) {
return null;
}
public R visitBlock(BlockTree node, P p) {
return scan(node.getStatements(), p);
}
public R visitDoWhileLoop(DoWhileLoopTree node, P p) {
R r = scan(node.getStatement(), p);
r = scanAndReduce(node.getCondition(), p, r);
return r;
}
public R visitWhileLoop(WhileLoopTree node, P p) {
R r = scan(node.getCondition(), p);
r = scanAndReduce(node.getStatement(), p, r);
return r;
}
public R visitForLoop(ForLoopTree node, P p) {
R r = scan(node.getInitializer(), p);
r = scanAndReduce(node.getCondition(), p, r);
r = scanAndReduce(node.getUpdate(), p, r);
r = scanAndReduce(node.getStatement(), p, r);
return r;
}
public R visitEnhancedForLoop(EnhancedForLoopTree node, P p) {
R r = scan(node.getVariable(), p);
r = scanAndReduce(node.getExpression(), p, r);
r = scanAndReduce(node.getStatement(), p, r);
return r;
}
public R visitLabeledStatement(LabeledStatementTree node, P p) {
return scan(node.getStatement(), p);
}
public R visitSwitch(SwitchTree node, P p) {
R r = scan(node.getExpression(), p);
r = scanAndReduce(node.getCases(), p, r);
return r;
}
public R visitCase(CaseTree node, P p) {
R r = scan(node.getExpression(), p);
r = scanAndReduce(node.getStatements(), p, r);
return r;
}
public R visitSynchronized(SynchronizedTree node, P p) {
R r = scan(node.getExpression(), p);
r = scanAndReduce(node.getBlock(), p, r);
return r;
}
public R visitTry(TryTree node, P p) {
R r = scan(node.getResources(), p);
r = scanAndReduce(node.getBlock(), p, r);
r = scanAndReduce(node.getCatches(), p, r);
r = scanAndReduce(node.getFinallyBlock(), p, r);
return r;
}
public R visitCatch(CatchTree node, P p) {
R r = scan(node.getParameter(), p);
r = scanAndReduce(node.getBlock(), p, r);
return r;
}
public R visitConditionalExpression(ConditionalExpressionTree node, P p) {
R r = scan(node.getCondition(), p);
r = scanAndReduce(node.getTrueExpression(), p, r);
r = scanAndReduce(node.getFalseExpression(), p, r);
return r;
}
public R visitIf(IfTree node, P p) {
R r = scan(node.getCondition(), p);
r = scanAndReduce(node.getThenStatement(), p, r);
r = scanAndReduce(node.getElseStatement(), p, r);
return r;
}
public R visitExpressionStatement(ExpressionStatementTree node, P p) {
return scan(node.getExpression(), p);
}
public R visitBreak(BreakTree node, P p) {
return null;
}
public R visitContinue(ContinueTree node, P p) {
return null;
}
public R visitReturn(ReturnTree node, P p) {
return scan(node.getExpression(), p);
}
public R visitThrow(ThrowTree node, P p) {
return scan(node.getExpression(), p);
}
public R visitAssert(AssertTree node, P p) {
R r = scan(node.getCondition(), p);
r = scanAndReduce(node.getDetail(), p, r);
return r;
}
public R visitMethodInvocation(MethodInvocationTree node, P p) {
R r = scan(node.getTypeArguments(), p);
r = scanAndReduce(node.getMethodSelect(), p, r);
r = scanAndReduce(node.getArguments(), p, r);
return r;
}
public R visitNewClass(NewClassTree node, P p) {
R r = scan(node.getEnclosingExpression(), p);
r = scanAndReduce(node.getIdentifier(), p, r);
r = scanAndReduce(node.getTypeArguments(), p, r);
r = scanAndReduce(node.getArguments(), p, r);
r = scanAndReduce(node.getClassBody(), p, r);
return r;
}
public R visitNewArray(NewArrayTree node, P p) {
R r = scan(node.getType(), p);
r = scanAndReduce(node.getDimensions(), p, r);
r = scanAndReduce(node.getInitializers(), p, r);
return r;
}
public R visitParenthesized(ParenthesizedTree node, P p) {
return scan(node.getExpression(), p);
}
public R visitAssignment(AssignmentTree node, P p) {
R r = scan(node.getVariable(), p);
r = scanAndReduce(node.getExpression(), p, r);
return r;
}
public R visitCompoundAssignment(CompoundAssignmentTree node, P p) {
R r = scan(node.getVariable(), p);
r = scanAndReduce(node.getExpression(), p, r);
return r;
}
public R visitUnary(UnaryTree node, P p) {
return scan(node.getExpression(), p);
}
public R visitBinary(BinaryTree node, P p) {
R r = scan(node.getLeftOperand(), p);
r = scanAndReduce(node.getRightOperand(), p, r);
return r;
}
public R visitTypeCast(TypeCastTree node, P p) {
R r = scan(node.getType(), p);
r = scanAndReduce(node.getExpression(), p, r);
return r;
}
public R visitInstanceOf(InstanceOfTree node, P p) {
R r = scan(node.getExpression(), p);
r = scanAndReduce(node.getType(), p, r);
return r;
}
public R visitArrayAccess(ArrayAccessTree node, P p) {
R r = scan(node.getExpression(), p);
r = scanAndReduce(node.getIndex(), p, r);
return r;
}
public R visitMemberSelect(MemberSelectTree node, P p) {
return scan(node.getExpression(), p);
}
public R visitIdentifier(IdentifierTree node, P p) {
return null;
}
public R visitLiteral(LiteralTree node, P p) {
return null;
}
public R visitPrimitiveType(PrimitiveTypeTree node, P p) {
return null;
}
public R visitArrayType(ArrayTypeTree node, P p) {
return scan(node.getType(), p);
}
public R visitParameterizedType(ParameterizedTypeTree node, P p) {
R r = scan(node.getType(), p);
r = scanAndReduce(node.getTypeArguments(), p, r);
return r;
}
public R visitUnionType(UnionTypeTree node, P p) {
return scan(node.getTypeAlternatives(), p);
}
public R visitTypeParameter(TypeParameterTree node, P p) {
R r = scan(node.getBounds(), p);
return r;
}
public R visitWildcard(WildcardTree node, P p) {
return scan(node.getBound(), p);
}
public R visitModifiers(ModifiersTree node, P p) {
return scan(node.getAnnotations(), p);
}
public R visitAnnotation(AnnotationTree node, P p) {
R r = scan(node.getAnnotationType(), p);
r = scanAndReduce(node.getArguments(), p, r);
return r;
}
public R visitOther(Tree node, P p) {
return null;
}
public R visitErroneous(ErroneousTree node, P p) {
return null;
}
}
| 12,484 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
package-info.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/util/package-info.java | /*
* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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 utilities for operations on abstract syntax trees (AST).
*
* @author Peter von der Ahé
* @author Jonathan Gibbons
* @since 1.6
*/
package com.sun.source.util;
| 1,395 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
TaskListener.java | /FileExtraction/Java_unseen/openjdk-mirror_jdk7u-langtools/src/share/classes/com/sun/source/util/TaskListener.java | /*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* 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.
*/
package com.sun.source.util;
/**
* Provides a listener to monitor the activity of the JDK Java Compiler, javac.
*
* @author Jonathan Gibbons
* @since 1.6
*/
public interface TaskListener
{
public void started(TaskEvent e);
public void finished(TaskEvent e);
}
| 1,490 | Java | .java | openjdk-mirror/jdk7u-langtools | 9 | 3 | 0 | 2012-05-07T19:45:34Z | 2012-05-08T17:47:06Z |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.