|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.jslint4java.JSLintBuilder
public class JSLintBuilder
Construct JSLint instances.
| Constructor Summary | |
|---|---|
JSLintBuilder()
|
|
| Method Summary | |
|---|---|
JSLint |
fromClasspathResource(String resource)
Initialize the scope from a jslint.js found in the classpath. |
JSLint |
fromClasspathResource(String resource,
Charset encoding)
Initialize the scope from a jslint.js found in the classpath. |
JSLint |
fromDefault()
Initialize the scope with a default jslint.js. |
JSLint |
fromFile(File f)
Initialize the scope with the jslint.js passed in on the filesystem. |
JSLint |
fromFile(File f,
Charset encoding)
Initialize the scope with the jslint.js passed in on the filesystem. |
JSLint |
fromReader(Reader reader,
String name)
Initialize the scope with an arbitrary jslint. |
JSLintBuilder |
timeout(long maxTimeInSeconds)
Set this JSLint instance to time out after maxTimeInSeconds. |
JSLintBuilder |
timeout(long maxTime,
TimeUnit timeUnit)
Set this JSLint instance to timeout after maxTime. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JSLintBuilder()
| Method Detail |
|---|
public JSLint fromClasspathResource(String resource)
throws IOException
resource - the location of jslint.js on the classpath.
JSLint
IOException - if there are any problems reading the resource.
public JSLint fromClasspathResource(String resource,
Charset encoding)
throws IOException
resource - the location of jslint.js on the classpath.encoding - the encoding of the resource.
JSLint
IOException - if there are any problems reading the resource.public JSLint fromDefault()
JSLint
RuntimeException - if we fail to load the default jslint.js.
public JSLint fromFile(File f)
throws IOException
f - the path to jslint.js
JSLint
IOException - if the file can't be read.
public JSLint fromFile(File f,
Charset encoding)
throws IOException
f - the path to jslint.jsencoding - the encoding of the file
JSLint
IOException - if the file can't be read.
@NeedsContext
public JSLint fromReader(Reader reader,
String name)
throws IOException
reader - an input source providing jslint.js.name - the name of the resource backed by the reader
JSLint
IOException - if there are any problems reading from reader .public JSLintBuilder timeout(long maxTimeInSeconds)
maxTimeInSeconds - maximum execution time in seconds.
public JSLintBuilder timeout(long maxTime,
TimeUnit timeUnit)
maxTime - The maximum execution time.timeUnit - The unit of maxTime.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||