net.happygiraffe.jslint
Enum Option

java.lang.Object
  extended by java.lang.Enum<Option>
      extended by net.happygiraffe.jslint.Option
All Implemented Interfaces:
Serializable, Comparable<Option>

public enum Option
extends Enum<Option>

All available options for tuning the behaviour of JSLint.

Version:
$Id$
Author:
dom

Enum Constant Summary
ADSAFE
          If adsafe should be enforced
BITWISE
          If bitwise operators should not be allowed
BROWSER
          If the standard browser globals should be predefined
CAP
          If upper case html should be allowed
DEBUG
          If debugger statements should be allowed
EQEQEQ
          If === should be required
EVIL
          If eval should be allowed
FORIN
          If for in statements must filter
FRAGMENT
          If html fragments should be allowed
LAXBREAK
          If line breaks should not be checked
NOMEN
          If names should be checked
ON
          If html event handlers should be allowed
ONEVAR
          If only one var statement per function should be allowed
PASSFAIL
          If the scan should stop on first error
PLUSPLUS
          If increment/decrement should not be allowed
REGEXP
          If the .
RHINO
          If the rhino environment globals should be predefined
SAFE
          If use of some browser features should be restricted
SIDEBAR
          If the system object should be predefined
STRICT
          Require the "use strict"; pragma
SUB
          If all forms of subscript notation are tolerated
UNDEF
          If variables should be declared before used
WHITE
          If strict whitespace rules apply
WIDGET
          If the yahoo widgets globals should be predefined
 
Method Summary
 String getDescription()
          Return a description of what this option affects.
 String getLowerName()
          Return the lowercase name of this option.
static int maximumNameLength()
          Calculate the maximum length of all of the Option names.
 String toString()
          Show this option and its description.
static Option valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Option[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ADSAFE

public static final Option ADSAFE
If adsafe should be enforced


BITWISE

public static final Option BITWISE
If bitwise operators should not be allowed


BROWSER

public static final Option BROWSER
If the standard browser globals should be predefined


CAP

public static final Option CAP
If upper case html should be allowed


DEBUG

public static final Option DEBUG
If debugger statements should be allowed


EQEQEQ

public static final Option EQEQEQ
If === should be required


EVIL

public static final Option EVIL
If eval should be allowed


FORIN

public static final Option FORIN
If for in statements must filter


FRAGMENT

public static final Option FRAGMENT
If html fragments should be allowed


LAXBREAK

public static final Option LAXBREAK
If line breaks should not be checked


NOMEN

public static final Option NOMEN
If names should be checked


ON

public static final Option ON
If html event handlers should be allowed


ONEVAR

public static final Option ONEVAR
If only one var statement per function should be allowed


PASSFAIL

public static final Option PASSFAIL
If the scan should stop on first error


PLUSPLUS

public static final Option PLUSPLUS
If increment/decrement should not be allowed


REGEXP

public static final Option REGEXP
If the . should not be allowed in regexp literals


RHINO

public static final Option RHINO
If the rhino environment globals should be predefined


SAFE

public static final Option SAFE
If use of some browser features should be restricted


SIDEBAR

public static final Option SIDEBAR
If the system object should be predefined


STRICT

public static final Option STRICT
Require the "use strict"; pragma


SUB

public static final Option SUB
If all forms of subscript notation are tolerated


UNDEF

public static final Option UNDEF
If variables should be declared before used


WHITE

public static final Option WHITE
If strict whitespace rules apply


WIDGET

public static final Option WIDGET
If the yahoo widgets globals should be predefined

Method Detail

values

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

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

valueOf

public static Option 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

getDescription

public String getDescription()
Return a description of what this option affects.


getLowerName

public String getLowerName()
Return the lowercase name of this option.


maximumNameLength

public static int maximumNameLength()
Calculate the maximum length of all of the Option names.

Returns:
the length of the largest name.

toString

public String toString()
Show this option and its description.

Overrides:
toString in class Enum<Option>