com.googlecode.jslint4java
Enum Option

java.lang.Object
  extended by java.lang.Enum<Option>
      extended by com.googlecode.jslint4java.Option
All Implemented Interfaces:
Serializable, Comparable<Option>

public enum Option
extends Enum<Option>

All available options for tuning the behaviour of JSLint. TODO Add a "Handler" class for each type, which knows whether it needs an arg, how to parse it, etc.

Author:
dom

Enum Constant Summary
ANON
          If the space may be omitted in anonymous function declarations
BITWISE
          If bitwise operators should be allowed
BROWSER
          If the standard browser globals should be predefined
CAP
          If upper case html should be allowed
CONTINUE
          If the continuation statement should be tolerated
CSS
          If css workarounds should be tolerated
DEBUG
          If debugger statements should be allowed
DEVEL
          If logging should be allowed (console, alert, etc.)
EQEQ
          If == should be allowed
ES5
          If es5 syntax should be allowed
EVIL
          If eval should be allowed
FORIN
          If for in statements need not filter
FRAGMENT
          If html fragments should be allowed
INDENT
          The indentation factor
MAXERR
          The maximum number of errors to allow
MAXLEN
          The maximum length of a source line
NEWCAP
          If constructor names capitalization is ignored
NODE
          If node.js globals should be predefined
NOMEN
          If names may have dangling _
ON
          If html event handlers should be allowed
PASSFAIL
          If the scan should stop on first error
PLUSPLUS
          If increment/decrement should be allowed
PREDEF
          The names of predefined global variables
PROPERTIES
          If all property names must be declared with /*properties*/
REGEXP
          If the .
RHINO
          If the rhino environment globals should be predefined
SLOPPY
          If the 'use strict'; pragma is optional
SUB
          If all forms of subscript notation are tolerated
UNDEF
          If variables can be declared out of order
UNPARAM
          If unused parameters should be tolerated
VARS
          If multiple var statements per function should be allowed
WHITE
          If sloppy whitespace is tolerated
WIDGET
          If the yahoo widgets globals should be predefined
WINDOWS
          If ms windows-specific 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.
 Class<?> getType()
          What type does the value of this option have?
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

ANON

public static final Option ANON
If the space may be omitted in anonymous function declarations


BITWISE

public static final Option BITWISE
If bitwise operators should 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


CONTINUE

public static final Option CONTINUE
If the continuation statement should be tolerated


CSS

public static final Option CSS
If css workarounds should be tolerated


DEBUG

public static final Option DEBUG
If debugger statements should be allowed


DEVEL

public static final Option DEVEL
If logging should be allowed (console, alert, etc.)


EQEQ

public static final Option EQEQ
If == should be allowed


ES5

public static final Option ES5
If es5 syntax should be allowed


EVIL

public static final Option EVIL
If eval should be allowed


FORIN

public static final Option FORIN
If for in statements need not filter


FRAGMENT

public static final Option FRAGMENT
If html fragments should be allowed


INDENT

public static final Option INDENT
The indentation factor


MAXERR

public static final Option MAXERR
The maximum number of errors to allow


MAXLEN

public static final Option MAXLEN
The maximum length of a source line


NEWCAP

public static final Option NEWCAP
If constructor names capitalization is ignored


NODE

public static final Option NODE
If node.js globals should be predefined


NOMEN

public static final Option NOMEN
If names may have dangling _


ON

public static final Option ON
If html event handlers 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 be allowed


PREDEF

public static final Option PREDEF
The names of predefined global variables


PROPERTIES

public static final Option PROPERTIES
If all property names must be declared with /*properties*/


REGEXP

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


RHINO

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


SLOPPY

public static final Option SLOPPY
If the 'use strict'; pragma is optional


SUB

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


UNDEF

public static final Option UNDEF
If variables can be declared out of order


UNPARAM

public static final Option UNPARAM
If unused parameters should be tolerated


VARS

public static final Option VARS
If multiple var statements per function should be allowed


WHITE

public static final Option WHITE
If sloppy whitespace is tolerated


WIDGET

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


WINDOWS

public static final Option WINDOWS
If ms windows-specific 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.


getType

public Class<?> getType()
What type does the value of this option have?


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>


Copyright © 2007-2012. All Rights Reserved.