edu.rice.cs.drjava.model.definitions.indent
Enum Indenter.IndentReason

java.lang.Object
  extended by java.lang.Enum<Indenter.IndentReason>
      extended by edu.rice.cs.drjava.model.definitions.indent.Indenter.IndentReason
All Implemented Interfaces:
Serializable, Comparable<Indenter.IndentReason>
Enclosing class:
Indenter

public static enum Indenter.IndentReason
extends Enum<Indenter.IndentReason>

Enumeration of reasons why indentation may be preformed.


Enum Constant Summary
ENTER_KEY_PRESS
          Indicates that an enter key press caused the indentation.
OTHER
          Indicates that indentation was started for some other reason.
 
Method Summary
static Indenter.IndentReason valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Indenter.IndentReason[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ENTER_KEY_PRESS

public static final Indenter.IndentReason ENTER_KEY_PRESS
Indicates that an enter key press caused the indentation. This is important for some rules dealing with stars at the line start in multiline comments


OTHER

public static final Indenter.IndentReason OTHER
Indicates that indentation was started for some other reason. This is important for some rules dealing with stars at the line start in multiline comments

Method Detail

values

public static Indenter.IndentReason[] 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 (Indenter.IndentReason c : Indenter.IndentReason.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Indenter.IndentReason valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null