com.google.javascript.rhino
Class FunctionNode

java.lang.Object
  extended by com.google.javascript.rhino.Node
      extended by com.google.javascript.rhino.ScriptOrFnNode
          extended by com.google.javascript.rhino.FunctionNode
All Implemented Interfaces:
Serializable, Cloneable

public class FunctionNode
extends ScriptOrFnNode

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.javascript.rhino.Node
Node.AncestorIterable, Node.FileLevelJsDocBuilder, Node.SideEffectFlags
 
Field Summary
static int FUNCTION_EXPRESSION
           
static int FUNCTION_EXPRESSION_STATEMENT
           
static int FUNCTION_STATEMENT
          There are three types of functions that can be defined.
 
Fields inherited from class com.google.javascript.rhino.ScriptOrFnNode
DUPLICATE_CONST, DUPLICATE_PARAMETER, DUPLICATE_VAR, NO_DUPLICATE
 
Fields inherited from class com.google.javascript.rhino.Node
ATTRIBUTE_FLAG, BOTH, BRACELESS_TYPE, BREAK_PROP, CASEARRAY_PROP, CASES_PROP, CATCH_SCOPE_PROP, CODEOFFSET_PROP, COLUMN_BITS, COLUMN_MASK, CONTINUE_PROP, DEBUGSOURCE_PROP, DECR_FLAG, DEFAULT_PROP, DESCENDANTS_FLAG, DIRECT_EVAL, DIRECTCALL_PROP, DIRECTIVES, EMPTY_BLOCK, ENUM_PROP, FINALLY_PROP, FIXUPS_PROP, FLAG_ARGUMENTS_UNMODIFIED, FLAG_GLOBAL_STATE_UNMODIFIED, FLAG_LOCAL_RESULTS, FLAG_NO_THROWS, FLAG_THIS_UNMODIFIED, FREE_CALL, FUNCTION_PROP, INCRDECR_PROP, INPUT_ID, IS_CONSTANT_NAME, IS_DISPATCHER, IS_NAMESPACE, IS_OPTIONAL_PARAM, IS_VAR_ARGS_PARAM, ISNUMBER_PROP, JSDOC_INFO_PROP, LABEL_ID_PROP, LABEL_PROP, LAST_PROP, LASTUSE_PROP, LEFT, LENGTH, LOCAL_BLOCK_PROP, LOCAL_PROP, LOCALCOUNT_PROP, MAX_COLUMN_NUMBER, MEMBER_TYPE_PROP, NAME_PROP, NO_SIDE_EFFECTS, NON_SPECIALCALL, OBJECT_IDS_PROP, OPT_ARG_NAME, ORIGINALNAME_PROP, PARENTHESIZED_PROP, POST_FLAG, PROPERTY_FLAG, QUOTED_PROP, REGEXP_PROP, RIGHT, SIDE_EFFECT_FLAGS, SIDE_EFFECTS_ALL, SIDE_EFFECTS_FLAGS_MASK, SKIP_INDEXES_PROP, SOURCENAME_PROP, SPECIAL_PROP_PROP, SPECIALCALL_EVAL, SPECIALCALL_PROP, SPECIALCALL_WITH, STATIC_SOURCE_FILE, SYNTHETIC_BLOCK_PROP, TARGET_PROP, TARGETBLOCK_PROP, TEMP_PROP, TYPE_PROP, USES_PROP, VAR_ARGS_NAME, VARIABLE_PROP, VARS_PROP
 
Constructor Summary
FunctionNode(String name)
           
FunctionNode(String name, int lineno, int charno)
           
 
Method Summary
 String getFunctionName()
           
 int getFunctionType()
           
 boolean getIgnoreDynamicScope()
           
 boolean requiresActivation()
           
 
Methods inherited from class com.google.javascript.rhino.ScriptOrFnNode
addConst, addFunction, addParam, addRegexp, addVar, getBaseLineno, getCompilerData, getEncodedSourceEnd, getEncodedSourceStart, getEndLineno, getFunctionCount, getFunctionNode, getParamAndVarConst, getParamAndVarCount, getParamAndVarNames, getParamCount, getParamOrVarIndex, getParamOrVarName, getRegexpCount, getRegexpFlags, getRegexpString, getSourceName, hasParamOrVar, removeParamOrVar, setBaseLineno, setCompilerData, setEncodedSourceBounds, setEndLineno, setSourceName
 
Methods inherited from class com.google.javascript.rhino.Node
addChildAfter, addChildBefore, addChildrenToBack, addChildrenToFront, addChildToBack, addChildToFront, addSuppression, appendStringTree, checkTreeEquals, children, cloneNode, clonePropsFrom, cloneTree, copyInformationFrom, copyInformationFromForTree, detachChildren, detachFromParent, extractCharno, extractLineno, getAncestor, getAncestors, getBooleanProp, getCharno, getChildAtIndex, getChildBefore, getChildCount, getDirectives, getDouble, getExistingIntProp, getFirstChild, getIndexOfChild, getInputId, getIntProp, getJsDocBuilderForNode, getJSDocInfo, getJSType, getLastChild, getLastSibling, getLength, getLineno, getNext, getParent, getProp, getQualifiedName, getSideEffectFlags, getSourceFileName, getSourceOffset, getSourcePosition, getStaticSourceFile, getString, getType, hasChild, hasChildren, hasMoreThanOneChild, hasOneChild, hasSideEffects, isEquivalentTo, isEquivalentToTyped, isFromExterns, isLocalResultCall, isNoSideEffectsCall, isOnlyModifiesThisCall, isOptionalArg, isQualifiedName, isQuotedString, isSyntheticBlock, isUnscopedQualifiedName, isVarArgs, mergeLineCharNo, newNumber, newNumber, newString, newString, newString, newString, putBooleanProp, putIntProp, putProp, removeChild, removeChildAfter, removeChildren, removeFirstChild, removeProp, replaceChild, replaceChildAfter, setCharno, setDirectives, setDouble, setInputId, setIsSyntheticBlock, setJSDocInfo, setJSType, setLength, setLineno, setOptionalArg, setQuotedString, setSideEffectFlags, setSideEffectFlags, setSourceEncodedPosition, setSourceEncodedPositionForTree, setSourceFileForTesting, setStaticSourceFile, setString, setType, setVarArgs, setWasEmptyNode, siblings, tokenToName, toString, toString, toStringTree, useSourceInfoFrom, useSourceInfoFromForTree, useSourceInfoIfMissingFrom, useSourceInfoIfMissingFromForTree, wasEmptyNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FUNCTION_STATEMENT

public static final int FUNCTION_STATEMENT
There are three types of functions that can be defined. The first is a function statement. This is a function appearing as a top-level statement (i.e., not nested inside some other statement) in either a script or a function. The second is a function expression, which is a function appearing in an expression except for the third type, which is... The third type is a function expression where the expression is the top-level expression in an expression statement. The three types of functions have different treatment and must be distinquished.

See Also:
Constant Field Values

FUNCTION_EXPRESSION

public static final int FUNCTION_EXPRESSION
See Also:
Constant Field Values

FUNCTION_EXPRESSION_STATEMENT

public static final int FUNCTION_EXPRESSION_STATEMENT
See Also:
Constant Field Values
Constructor Detail

FunctionNode

public FunctionNode(String name)

FunctionNode

public FunctionNode(String name,
                    int lineno,
                    int charno)
Method Detail

getFunctionName

public String getFunctionName()

requiresActivation

public boolean requiresActivation()

getIgnoreDynamicScope

public boolean getIgnoreDynamicScope()

getFunctionType

public int getFunctionType()