📄 tree.java
字号:
/* * @(#)Tree.java 1.8 06/08/03 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * Use and Distribution is subject to the Java Research License available * at <http://wwws.sun.com/software/communitysource/jrl.html>. */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 Sun's 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}. */ 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 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), /**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -