Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

javax.ide.model.java.source.tree
Class TreeKind

java.lang.Object
  extended by javax.ide.model.java.source.tree.TreeKind

public final class TreeKind
extends java.lang.Object

The TreeKind enumeration identifies each individual kind of Tree.

For code-readability, all constants have been prefixed as TREE_*. Constants for subinterfaces of StatementT have been prefixed as TREE_STMT_*. Constants for subinterfaces of ExpressionT have been prefixed as TREE_EXPR_*. Constants for subinterfaces of DocT have been prefixed as TREE_DOC_*.

Though the doc structure is not part of the Java Language specification (moreover, there is no specification of doc structure), doc comment constants have been included because refactoring features may need to access and mutate doc comment contents.

In this version, this class is 1.4 compatible. In a later version, it will be redone as an enum.


Field Summary
static TreeKind TREE_ANNOTATION
          An annotation.
static TreeKind TREE_BLOCK
          A code block.
static TreeKind TREE_CLASS_BODY
          A body of a class declaration.
static TreeKind TREE_CLASS_D
          A class, enum, interface, or annotation type declaration.
static TreeKind TREE_CLASS_INITIALIZER
          An initializer in a class declaration.
static TreeKind TREE_CONSTRUCTOR_D
          A constructor declaration.
static TreeKind TREE_DOC_COMMENT
          A doc comment.
static TreeKind TREE_ENUM_CONSTANT_D
          An enum constant declaration.
static TreeKind TREE_EXPR_ANNOTATION
          An expression wrapping an annotation.
static TreeKind TREE_EXPR_ARRAY_ACCESS
          An array access expression.
static TreeKind TREE_EXPR_ASSIGNMENT
          An expression for an assignment operation.
static TreeKind TREE_EXPR_DOT
          An expression for an identifier selector.
static TreeKind TREE_EXPR_IDENTIFIER
          An identifier expression.
static TreeKind TREE_EXPR_INFIX
          An expression for an infix operation.
static TreeKind TREE_EXPR_LIST
          A list of expressions.
static TreeKind TREE_EXPR_LITERAL
          A lexer literal.
static TreeKind TREE_EXPR_METHOD_CALL
          A method call.
static TreeKind TREE_EXPR_NEW_ARRAY
          An array creator expression.
static TreeKind TREE_EXPR_NEW_CLASS
          A class creator expression.
static TreeKind TREE_EXPR_QUESTION
          An expression for the conditional operator.
static TreeKind TREE_EXPR_TYPE
          An expression wrapping a type reference.
static TreeKind TREE_EXPR_TYPECAST
          An expression for a typecast operation.
static TreeKind TREE_EXPR_UNARY
          An expression for a prefix or postfix operation.
static TreeKind TREE_EXPR_WRAPPER
          An expression wrapping another expression.
static TreeKind TREE_FIELD_D
          A field declaration that is not for an enum constant.
static TreeKind TREE_FIELD_VARIABLE
          A field variable.
static TreeKind TREE_FILE
          A source file (a compilation unit).
static TreeKind TREE_FORMAL_PARAMETER
          A formal parameter.
static TreeKind TREE_FORMAL_PARAMETER_LIST
          A formal parameter list.
static TreeKind TREE_IMPORT_D
          An import declaration.
static TreeKind TREE_INTERFACES_D
          An interfaces clause for a class declaration.
static TreeKind TREE_LOCAL_VARIABLE
          A local variable.
static TreeKind TREE_LOCAL_VARIABLE_D
          A local variable declaration.
static TreeKind TREE_METHOD_D
          A method declaration that is not for a constructor.
static TreeKind TREE_NAME
          A name, either a simple name or a qualified name.
static TreeKind TREE_PACKAGE_D
          A package declaration.
static TreeKind TREE_STATEMENT_LABEL
          A statement label.
static TreeKind TREE_STMT_ASSERT
          An assert statement.
static TreeKind TREE_STMT_BLOCK
          A statement wrapping a block.
static TreeKind TREE_STMT_BREAK
          A break statement.
static TreeKind TREE_STMT_CATCH
          A catch clause in a try statement.
static TreeKind TREE_STMT_CONTINUE
          A continue statement.
static TreeKind TREE_STMT_DO
          A do-while statement.
static TreeKind TREE_STMT_ELSE
          An else clause in an if statement.
static TreeKind TREE_STMT_EMPTY
          An empty statement.
static TreeKind TREE_STMT_EXPRESSION
          A statement wrapping an expression.
static TreeKind TREE_STMT_FINALLY
          A finally clause in a try statement.
static TreeKind TREE_STMT_FOR
          A for statement, all variants.
static TreeKind TREE_STMT_IF
          An if statement.
static TreeKind TREE_STMT_RETURN
          A return statement.
static TreeKind TREE_STMT_SWITCH
          A switch statement.
static TreeKind TREE_STMT_SYNCH
          A synchronized statement.
static TreeKind TREE_STMT_THROW
          A throw statement.
static TreeKind TREE_STMT_TRY
          A try statement.
static TreeKind TREE_STMT_WHILE
          A while statement.
static TreeKind TREE_SUPERCLASS
          A super-class clause for a class declaration.
static TreeKind TREE_SWITCH_LABEL
          A switch case label, either case or default.
static TreeKind TREE_THROWS
          A throws clause for a method declaration.
static TreeKind TREE_TYPE_ARGUMENT
          A type argument in a type reference.
static TreeKind TREE_TYPE_PARAMETER
          A type parameter declaration.
static TreeKind TREE_TYPE_REFERENCE
          A type reference.
 
Method Summary
 int compareTo(TreeKind other)
           
 boolean equals(java.lang.Object other)
           
 java.lang.Class getDeclaringClass()
           
 java.lang.Class getTreeClass()
           
 int hashCode()
           
 java.lang.String name()
           
 int ordinal()
           
 java.lang.String toString()
           
static TreeKind valueOf(java.lang.Class ignored, java.lang.String name)
           
static TreeKind valueOf(int ordinal)
           
static TreeKind[] values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TREE_ANNOTATION

public static final TreeKind TREE_ANNOTATION
An annotation.


TREE_BLOCK

public static final TreeKind TREE_BLOCK
A code block.


TREE_CLASS_BODY

public static final TreeKind TREE_CLASS_BODY
A body of a class declaration.


TREE_CLASS_D

public static final TreeKind TREE_CLASS_D
A class, enum, interface, or annotation type declaration.


TREE_CLASS_INITIALIZER

public static final TreeKind TREE_CLASS_INITIALIZER
An initializer in a class declaration.


TREE_CONSTRUCTOR_D

public static final TreeKind TREE_CONSTRUCTOR_D
A constructor declaration.


TREE_DOC_COMMENT

public static final TreeKind TREE_DOC_COMMENT
A doc comment.


TREE_ENUM_CONSTANT_D

public static final TreeKind TREE_ENUM_CONSTANT_D
An enum constant declaration.


TREE_FIELD_D

public static final TreeKind TREE_FIELD_D
A field declaration that is not for an enum constant.


TREE_FIELD_VARIABLE

public static final TreeKind TREE_FIELD_VARIABLE
A field variable.


TREE_FILE

public static final TreeKind TREE_FILE
A source file (a compilation unit).


TREE_FORMAL_PARAMETER

public static final TreeKind TREE_FORMAL_PARAMETER
A formal parameter.


TREE_FORMAL_PARAMETER_LIST

public static final TreeKind TREE_FORMAL_PARAMETER_LIST
A formal parameter list.


TREE_IMPORT_D

public static final TreeKind TREE_IMPORT_D
An import declaration.


TREE_INTERFACES_D

public static final TreeKind TREE_INTERFACES_D
An interfaces clause for a class declaration. On a "class" declaration, this will be the "implements" clause. On an "interface" declaration, this will be the "extends" clause.

The name "interfaces" was taken from reflection.

See Also:
Class.getInterfaces()

TREE_LOCAL_VARIABLE

public static final TreeKind TREE_LOCAL_VARIABLE
A local variable.


TREE_LOCAL_VARIABLE_D

public static final TreeKind TREE_LOCAL_VARIABLE_D
A local variable declaration.


TREE_METHOD_D

public static final TreeKind TREE_METHOD_D
A method declaration that is not for a constructor.


TREE_NAME

public static final TreeKind TREE_NAME
A name, either a simple name or a qualified name.


TREE_PACKAGE_D

public static final TreeKind TREE_PACKAGE_D
A package declaration.


TREE_STATEMENT_LABEL

public static final TreeKind TREE_STATEMENT_LABEL
A statement label.


TREE_SUPERCLASS

public static final TreeKind TREE_SUPERCLASS
A super-class clause for a class declaration. On a "class" declaration, this will be the "extends" clause. The name "superclass" was taken from reflection.

See Also:
Class.getSuperclass()

TREE_SWITCH_LABEL

public static final TreeKind TREE_SWITCH_LABEL
A switch case label, either case or default.


TREE_THROWS

public static final TreeKind TREE_THROWS
A throws clause for a method declaration.


TREE_TYPE_REFERENCE

public static final TreeKind TREE_TYPE_REFERENCE
A type reference.


TREE_TYPE_ARGUMENT

public static final TreeKind TREE_TYPE_ARGUMENT
A type argument in a type reference.


TREE_TYPE_PARAMETER

public static final TreeKind TREE_TYPE_PARAMETER
A type parameter declaration.


TREE_STMT_ASSERT

public static final TreeKind TREE_STMT_ASSERT
An assert statement.


TREE_STMT_BLOCK

public static final TreeKind TREE_STMT_BLOCK
A statement wrapping a block.


TREE_STMT_BREAK

public static final TreeKind TREE_STMT_BREAK
A break statement.


TREE_STMT_CATCH

public static final TreeKind TREE_STMT_CATCH
A catch clause in a try statement.


TREE_STMT_CONTINUE

public static final TreeKind TREE_STMT_CONTINUE
A continue statement.


TREE_STMT_DO

public static final TreeKind TREE_STMT_DO
A do-while statement.


TREE_STMT_ELSE

public static final TreeKind TREE_STMT_ELSE
An else clause in an if statement.


TREE_STMT_EMPTY

public static final TreeKind TREE_STMT_EMPTY
An empty statement.


TREE_STMT_EXPRESSION

public static final TreeKind TREE_STMT_EXPRESSION
A statement wrapping an expression.


TREE_STMT_FINALLY

public static final TreeKind TREE_STMT_FINALLY
A finally clause in a try statement.


TREE_STMT_FOR

public static final TreeKind TREE_STMT_FOR
A for statement, all variants.


TREE_STMT_IF

public static final TreeKind TREE_STMT_IF
An if statement.


TREE_STMT_RETURN

public static final TreeKind TREE_STMT_RETURN
A return statement.


TREE_STMT_SWITCH

public static final TreeKind TREE_STMT_SWITCH
A switch statement.


TREE_STMT_SYNCH

public static final TreeKind TREE_STMT_SYNCH
A synchronized statement.


TREE_STMT_THROW

public static final TreeKind TREE_STMT_THROW
A throw statement.


TREE_STMT_TRY

public static final TreeKind TREE_STMT_TRY
A try statement.


TREE_STMT_WHILE

public static final TreeKind TREE_STMT_WHILE
A while statement.


TREE_EXPR_ANNOTATION

public static final TreeKind TREE_EXPR_ANNOTATION
An expression wrapping an annotation. Used only in annotations.


TREE_EXPR_ARRAY_ACCESS

public static final TreeKind TREE_EXPR_ARRAY_ACCESS
An array access expression.


TREE_EXPR_ASSIGNMENT

public static final TreeKind TREE_EXPR_ASSIGNMENT
An expression for an assignment operation.


TREE_EXPR_DOT

public static final TreeKind TREE_EXPR_DOT
An expression for an identifier selector.


TREE_EXPR_IDENTIFIER

public static final TreeKind TREE_EXPR_IDENTIFIER
An identifier expression.


TREE_EXPR_INFIX

public static final TreeKind TREE_EXPR_INFIX
An expression for an infix operation.


TREE_EXPR_LIST

public static final TreeKind TREE_EXPR_LIST
A list of expressions. May be an argument list or an array constant.


TREE_EXPR_LITERAL

public static final TreeKind TREE_EXPR_LITERAL
A lexer literal. Does not include class literals.


TREE_EXPR_METHOD_CALL

public static final TreeKind TREE_EXPR_METHOD_CALL
A method call.


TREE_EXPR_NEW_ARRAY

public static final TreeKind TREE_EXPR_NEW_ARRAY
An array creator expression.


TREE_EXPR_NEW_CLASS

public static final TreeKind TREE_EXPR_NEW_CLASS
A class creator expression.


TREE_EXPR_QUESTION

public static final TreeKind TREE_EXPR_QUESTION
An expression for the conditional operator.


TREE_EXPR_TYPE

public static final TreeKind TREE_EXPR_TYPE
An expression wrapping a type reference.


TREE_EXPR_TYPECAST

public static final TreeKind TREE_EXPR_TYPECAST
An expression for a typecast operation.


TREE_EXPR_UNARY

public static final TreeKind TREE_EXPR_UNARY
An expression for a prefix or postfix operation. Also includes keyword selectors.


TREE_EXPR_WRAPPER

public static final TreeKind TREE_EXPR_WRAPPER
An expression wrapping another expression. Will be either a parenthesis wrapper or a bracket wrapper.

Method Detail

getTreeClass

public java.lang.Class getTreeClass()

name

public java.lang.String name()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

ordinal

public int ordinal()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

compareTo

public int compareTo(TreeKind other)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

getDeclaringClass

public java.lang.Class getDeclaringClass()

valueOf

public static TreeKind valueOf(int ordinal)

valueOf

public static TreeKind valueOf(java.lang.Class ignored,
                               java.lang.String name)

values

public static TreeKind[] values()

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.