public class ClosureScope extends ScopeSupport implements Variables
Collection.Key
TYPE_UNDEFINED
SCOPE_APPLICATION, SCOPE_ARGUMENTS, SCOPE_CALLER, SCOPE_CGI, SCOPE_CLIENT, SCOPE_CLUSTER, SCOPE_COOKIE, SCOPE_COUNT, SCOPE_FORM, SCOPE_LOCAL, SCOPE_REQUEST, SCOPE_SERVER, SCOPE_SESSION, SCOPE_UNDEFINED, SCOPE_URL, SCOPE_VAR, SCOPE_VARIABLES
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
Constructor and Description |
---|
ClosureScope(PageContext pc,
Argument arg,
Local local,
Variables var) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
clears the collection
|
boolean |
containsKey(Collection.Key key)
contains this key
|
Collection |
duplicate(boolean deepCopy) |
Iterator<Map.Entry<Collection.Key,Object>> |
entryIterator() |
Object |
get(Collection.Key key)
return a value from the collection
|
Object |
get(Collection.Key key,
Object defaultValue)
return a value from the collection, if key doesn't exist, dont throw a exception, reeturns null
|
Argument |
getArgument() |
int |
getType() |
String |
getTypeAsString() |
Undefined |
getUndefined() |
Variables |
getVariables() |
void |
initialize(PageContext pc)
Initalize Scope
|
boolean |
isBind() |
boolean |
isInitalized()
return if the scope is Initialiesd
|
Iterator<Collection.Key> |
keyIterator() |
Collection.Key[] |
keys() |
Iterator<String> |
keysAsStringIterator() |
void |
release()
release scope for reuse
|
void |
release(PageContext pc)
release scope for reuse
|
Object |
remove(Collection.Key key)
removes value from collection and return it when it exists, otherwise throws a exception
|
Object |
removeEL(Collection.Key key)
removes value from collection and return it when it exists, otherwise returns null
|
Object |
set(Collection.Key key,
Object value)
sets a value to the collection
|
void |
setBind(boolean bind)
sets if scope is binded to a closure
|
Object |
setEL(Collection.Key key,
Object value)
sets a value to the collection, if key doesn't exist, dont throw a exception, returns null
|
int |
size() |
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties properties)
method to print out information to a object as HTML
|
Iterator<Object> |
valueIterator() |
_getId, sizeOf, toDumpData
containsValue, copy, equals, g, g, hashCode, remove, values
call, callWithNamedValues, castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, clone, compareTo, compareTo, compareTo, compareTo, containsKey, containsKey, entrySet, get, get, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, toString
clone, containsKey, get, get, set, setEL
getIterator
containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, values
call, callWithNamedValues, get, get, set, setEL
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
public ClosureScope(PageContext pc, Argument arg, Local local, Variables var)
public Argument getArgument()
public Variables getVariables()
public Undefined getUndefined()
public boolean isInitalized()
Scope
isInitalized
in interface Scope
isInitalized
in class ScopeSupport
public void initialize(PageContext pc)
Scope
initialize
in interface Scope
initialize
in class ScopeSupport
pc
- Page Contextpublic void release()
Scope
release
in interface Scope
release
in class ScopeSupport
public void release(PageContext pc)
Scope
release
in interface Scope
release
in class ScopeSupport
public int getType()
getType
in interface Scope
getType
in class ScopeSupport
public String getTypeAsString()
getTypeAsString
in interface Scope
getTypeAsString
in class ScopeSupport
public int size()
size
in interface Map
size
in interface Collection
size
in class StructImpl
public Collection.Key[] keys()
keys
in interface Collection
keys
in class StructImpl
public Object remove(Collection.Key key) throws PageException
Collection
remove
in interface Collection
remove
in class StructImpl
key
- key of the collectionPageException
public Object removeEL(Collection.Key key)
Collection
removeEL
in interface Collection
removeEL
in class StructImpl
key
- key of the collectionpublic void clear()
Collection
clear
in interface Map
clear
in interface Collection
clear
in class StructImpl
public Object get(Collection.Key key) throws PageException
Collection
get
in interface Collection
get
in class StructImpl
key
- key of the value to get must be lower casePageException
public Object get(Collection.Key key, Object defaultValue)
Collection
get
in interface Collection
get
in class StructImpl
key
- key of the value to getpublic Object set(Collection.Key key, Object value) throws PageException
Collection
set
in interface Collection
set
in class StructImpl
key
- key of the new valuevalue
- value to setPageException
public Object setEL(Collection.Key key, Object value)
Collection
setEL
in interface Collection
setEL
in class StructImpl
key
- key of the value to getvalue
- value to setpublic Collection duplicate(boolean deepCopy)
duplicate
in interface Collection
duplicate
in class StructImpl
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
containsKey
in class StructImpl
public Iterator<Collection.Key> keyIterator()
keyIterator
in interface Iteratorable
keyIterator
in class StructImpl
public Iterator<String> keysAsStringIterator()
keysAsStringIterator
in interface Iteratorable
keysAsStringIterator
in class StructImpl
public Iterator<Map.Entry<Collection.Key,Object>> entryIterator()
entryIterator
in interface Iteratorable
entryIterator
in class StructImpl
public Iterator<Object> valueIterator()
valueIterator
in interface Iteratorable
valueIterator
in class StructImpl
public void setBind(boolean bind)
Variables
public boolean isBind()
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties)
Dumpable
toDumpData
in interface Dumpable
toDumpData
in class ScopeSupport
Copyright © 2015 Lucee