Enum Tree.Kind

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Tree.Kind>
    Enclosing interface:
    Tree

    public static enum Tree.Kind
    extends java.lang.Enum<Tree.Kind>
    Enumerates all kinds of trees.
    • Method Detail

      • values

        public static Tree.Kind[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Tree.Kind c : Tree.Kind.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Tree.Kind valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • asInterface

        public java.lang.Class<? extends Tree> asInterface()
        Returns the associated interface type that uses this kind.
        Returns:
        the associated interface
      • isLiteral

        public boolean isLiteral()
        Returns if this is a literal tree kind or not.
        Returns:
        true if this is a literal tree kind, false otherwise
      • isExpression

        public boolean isExpression()
        Returns if this is an expression tree kind or not.
        Returns:
        true if this is an expression tree kind, false otherwise
      • isStatement

        public boolean isStatement()
        Returns if this is a statement tree kind or not.
        Returns:
        true if this is a statement tree kind, false otherwise