Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.caucho.es
Class ESClosure

    java.lang.Object
      |
      +--com.caucho.es.ESBase
            |
            +--com.caucho.es.ESObject
                  |
                  +--com.caucho.es.ESClosure

public class ESClosure
extends ESObject

Implementation class representing a JavaScript function.

Field Summary
`int` | `n`
`ESString` | `name`

Fields inherited from class com.caucho.es.ESObject
`snapPrototype`

Fields inherited from class com.caucho.es.ESBase
`DONT_DELETE, DONT_ENUM, esBase, esEmpty, esNull, esUndefined, READ_ONLY`

Constructor Summary
`protected` | `ESClosure()` Create a new object based on a prototype
`protected` | `ESClosure(ESBase[] scope, int scopeLength)`
`` | `ESClosure(ESString name, Script script, ESObject proto, int n, ESId[] formals, ESObject global)`

Method Summary
`ESBase` | `call(Call call, int length)`
`boolean` | `canPut(ESString id)`
`void` | `closure(Call env)`
`ESBase` | `construct(Call eval, int length)`
`protected void` | `copy(java.lang.Object newObj)`
`ESBase` | `delete(ESString id)` Deletes the entry.
`protected ESBase` | `dispatch()`
`ESObject` | `dup()`
`ESBase` | `getProperty(ESString id)` Gets a property value.
`ESBase` | `hasProperty(ESString id)`
`void` | `put(ESString id, ESBase value, int flags)`
`void` | `setProperty(ESString id, ESBase value)` Puts a new value in the property table with the appropriate flags
`ESString` | `toStr()` Returns a string rep of the object
`ESBase` | `typeof()`

Methods inherited from class com.caucho.es.ESObject
`copy, copy, ecmaEquals, keys, put, put, shallowCopy, toBoolean, toJavaObject, toNum, toObject, toPrimitive, toSource, unwatch, watch`

Methods inherited from class com.caucho.es.ESBase
`call, getProperty, greaterThan, isBoolean, isNum, isString, lessThan, plus, setProperty, setProperty, toInt32, toJavaString, toPrimitive, toString, valueOf`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    public ESString name

### n

    public int n

Constructor Detail

### ESClosure

    public ESClosure(ESString name,
                     Script script,
                     ESObject proto,
                     int n,
                     ESId[] formals,
                     ESObject global)

### ESClosure

    protected ESClosure(ESBase[] scope,
                        int scopeLength)

### ESClosure

    protected ESClosure()

  Create a new object based on a prototype

Method Detail

### closure

    public void closure(Call env)

### hasProperty

    public ESBase hasProperty(ESString id)
                       throws java.lang.Exception

  Overrides:
    `hasProperty` in class `ESBase`

### getProperty

    public ESBase getProperty(ESString id)
                       throws java.lang.Exception

  Description copied from class: `ESObject`
  Gets a property value.
  Overrides:
    `getProperty` in class `ESObject`

### canPut

    public boolean canPut(ESString id)

  Overrides:
    `canPut` in class `ESObject`

### setProperty

    public void setProperty(ESString id,
                            ESBase value)
                     throws java.lang.Exception

  Description copied from class: `ESObject`
  Puts a new value in the property table with the appropriate flags
  Overrides:
    `setProperty` in class `ESObject`

### put

    public void put(ESString id,
                    ESBase value,
                    int flags)

  Overrides:
    `put` in class `ESObject`

### delete

    public ESBase delete(ESString id)
                  throws java.lang.Exception

  Description copied from class: `ESObject`
  Deletes the entry. Returns true if successful.
  Overrides:
    `delete` in class `ESObject`

### toStr

    public ESString toStr()

  Description copied from class: `ESObject`
  Returns a string rep of the object
  Overrides:
    `toStr` in class `ESObject`

### dispatch

    protected ESBase dispatch()
                       throws ESException

### call

    public ESBase call(Call call,
                       int length)
                throws java.lang.Exception

  Overrides:
    `call` in class `ESObject`

### construct

    public ESBase construct(Call eval,
                            int length)
                     throws java.lang.Exception

  Overrides:
    `construct` in class `ESObject`

### typeof

    public ESBase typeof()
                  throws ESException

  Overrides:
    `typeof` in class `ESObject`

### copy

    protected void copy(java.lang.Object newObj)

  Overrides:
    `copy` in class `ESObject`

### dup

    public ESObject dup()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD