com.googlecode.jslint4java
Class JSFunction

java.lang.Object
  extended by com.googlecode.jslint4java.JSFunction

public class JSFunction
extends Object

A JavaScript function definition. This is taken from JSLint's .data() function.

Author:
hdm

Nested Class Summary
static class JSFunction.Builder
          Allow construction of an immutable JSFunction from outside of this package.
 
Method Summary
 List<String> getClosure()
          The variables and parameters that are declared in the function that are used by its inner functions.
 List<String> getException()
          The variables that are declared by try statements.
 List<String> getGlobal()
          Global variables that are used by this function.
 List<String> getLabel()
          Statement labels that are used by this function.
 int getLast()
           
 int getLine()
          The line the function is defined on.
 String getName()
          The name of the function.
 List<String> getOuter()
          Variables used by this function that are declared in another function.
 List<String> getParams()
          The parameters of the function.
 List<String> getUndef()
           
 List<String> getUnused()
          The variables that are declared in the function that are not used.
 List<String> getVars()
          The variables that are declared in the function that are used only by the function.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getClosure

public List<String> getClosure()
The variables and parameters that are declared in the function that are used by its inner functions.


getException

public List<String> getException()
The variables that are declared by try statements.


getGlobal

public List<String> getGlobal()
Global variables that are used by this function. Keep these to a minimum.


getLabel

public List<String> getLabel()
Statement labels that are used by this function.


getLast

public int getLast()

getLine

public int getLine()
The line the function is defined on.


getName

public String getName()
The name of the function.


getOuter

public List<String> getOuter()
Variables used by this function that are declared in another function.


getParams

public List<String> getParams()
The parameters of the function.


getUnused

public List<String> getUnused()
The variables that are declared in the function that are not used. This may be an indication of an error.


getUndef

public List<String> getUndef()

getVars

public List<String> getVars()
The variables that are declared in the function that are used only by the function.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2007-2012. All Rights Reserved.