public final class ArgumentImpl extends ScopeSupport implements Argument
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 |
---|
ArgumentImpl()
constructor of the class
|
Modifier and Type | Method and Description |
---|---|
Object |
append(Object o)
append a new value to the end of the array
|
Object |
appendEL(Object o) |
Object |
call(PageContext pc,
Collection.Key methodName,
Object[] args)
calls a method of the object
|
Object |
callWithNamedValues(PageContext pc,
Collection.Key methodName,
Struct args)
call a method of the Object with named arguments
|
boolean |
containsFunctionArgumentKey(Collection.Key key) |
boolean |
containsKey(Collection.Key key)
contains this key
|
boolean |
containsKey(int key)
contains this key
|
Collection |
duplicate(boolean deepCopy) |
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
|
Object |
get(int intKey,
Object defaultValue)
return object a given position, key can only be a integer from 1 to array len
|
Object |
get(PageContext pc,
Collection.Key key)
return property or getter of the ContextCollection
|
Object |
get(PageContext pc,
Collection.Key key,
Object defaultValue)
return property
|
int |
getDimension()
return dimension of the array
|
Object |
getE(int intKey)
return a value matching to key
|
Object |
getFunctionArgument(Collection.Key key,
Object defaultValue) |
Object |
getFunctionArgument(String key,
Object defaultValue) |
boolean |
insert(int index,
Object value)
insert a value add defined position
|
boolean |
insert(int index,
String key,
Object value)
insert a key in argument scope at defined position
|
int[] |
intKeys() |
boolean |
isBind() |
Object |
prepend(Object o)
add a new value to the begin of the array
|
void |
release()
release scope for reuse
|
void |
release(PageContext pc)
release scope for reuse
|
Object |
removeE(int intKey)
removes a value ad defined key
|
Object |
removeEL(int intKey)
removes a value ad defined key
|
void |
resize(int to)
resize array to defined size
|
Object |
set(PageContext pc,
Collection.Key propertyName,
Object value)
sets a property (Data Member) value of the object
|
Object |
setArgument(Object obj) |
void |
setBind(boolean bind)
sets if scope is binded to a other variable for using outside of a udf
|
Object |
setE(int intKey,
Object value)
set value at defined position
|
Object |
setEL(int intKey,
Object value)
set value at defined position, on error return null
|
Object |
setEL(PageContext pc,
Collection.Key propertyName,
Object value)
sets a property (Data Member) value of the object
|
void |
setFunctionArgumentNames(Set functionArgumentNames) |
void |
sort(Comparator com) |
void |
sort(String sortType,
String sortOrder)
sort values of a array
|
Object[] |
toArray() |
static Array |
toArray(Argument arg)
converts a argument scope to a regular array
|
ArrayList |
toArrayList() |
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties dp)
method to print out information to a object as HTML
|
List |
toList() |
static Struct |
toStruct(Argument arg)
converts a argument scope to a regular struct
|
_getId, getType, getTypeAsString, initialize, isInitalized, sizeOf, toDumpData
clear, containsValue, copy, entryIterator, equals, g, g, hashCode, keyIterator, keys, keysAsStringIterator, remove, remove, removeEL, set, setEL, size, valueIterator, values
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, clone, compareTo, compareTo, compareTo, compareTo, containsKey, containsKey, entrySet, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, setEL, toString
getType, getTypeAsString, initialize, isInitalized
clear, clone, containsKey, get, get, keys, remove, removeEL, set, set, setEL, setEL, size
entryIterator, keyIterator, keysAsStringIterator, valueIterator
getIterator
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
public ArgumentImpl()
public 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 void setBind(boolean bind)
Argument
public boolean isBind()
public Object getFunctionArgument(String key, Object defaultValue)
getFunctionArgument
in interface Argument
public Object getFunctionArgument(Collection.Key key, Object defaultValue)
getFunctionArgument
in interface Argument
public boolean containsFunctionArgumentKey(Collection.Key key)
containsFunctionArgumentKey
in interface Argument
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 get(Collection.Key key) throws ExpressionException
Collection
get
in interface Collection
get
in class StructImpl
key
- key of the value to get must be lower caseExpressionException
public Object get(int intKey, Object defaultValue)
Array
public Object getE(int intKey) throws PageException
getE
in interface Array
intKey
- PageException
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp)
Dumpable
toDumpData
in interface Dumpable
toDumpData
in class ScopeSupport
public int getDimension()
Array
getDimension
in interface Array
public Object setEL(int intKey, Object value)
Array
public Object setE(int intKey, Object value) throws PageException
Array
setE
in interface Array
PageException
public int[] intKeys()
public boolean insert(int index, Object value) throws ExpressionException
Array
insert
in interface Array
index
- position to insertvalue
- value to insertExpressionException
public boolean insert(int index, String key, Object value) throws ExpressionException
Argument
insert
in interface Argument
ExpressionException
public Object append(Object o) throws PageException
Array
append
in interface Array
o
- value to insertPageException
public Object prepend(Object o) throws PageException
Array
prepend
in interface Array
o
- value to insertPageException
public void resize(int to) throws PageException
Array
resize
in interface Array
to
- new minimum size of the arrayPageException
public void sort(String sortType, String sortOrder) throws ExpressionException
Array
sort
in interface Array
sortType
- search type (text,textnocase,numeric)sortOrder
- (asc,desc)ExpressionException
public void sort(Comparator com)
public Object setArgument(Object obj) throws PageException
setArgument
in interface Argument
PageException
public ArrayList toArrayList()
public Object removeE(int intKey) throws PageException
Array
removeE
in interface Array
intKey
- key to removePageException
public Object removeEL(int intKey)
Array
public boolean containsKey(Collection.Key key)
Collection
containsKey
in interface Collection
containsKey
in class StructImpl
public boolean containsKey(int key)
Array
containsKey
in interface Array
public Collection duplicate(boolean deepCopy)
duplicate
in interface Collection
duplicate
in class StructImpl
public void setFunctionArgumentNames(Set functionArgumentNames)
setFunctionArgumentNames
in interface Argument
public static Struct toStruct(Argument arg)
arg
- argument scope to convertpublic static Array toArray(Argument arg)
arg
- argument scope to convertpublic Object get(PageContext pc, Collection.Key key, Object defaultValue)
Objects
get
in interface Objects
get
in class StructSupport
pc
- PageContextkey
- Name of the Propertypublic Object get(PageContext pc, Collection.Key key) throws PageException
Objects
get
in interface Objects
get
in class StructSupport
pc
- PageContextkey
- Name of the PropertyPageException
public Object set(PageContext pc, Collection.Key propertyName, Object value) throws PageException
Objects
set
in interface Objects
set
in class StructSupport
propertyName
- property name to setvalue
- value to insertPageException
public Object setEL(PageContext pc, Collection.Key propertyName, Object value)
Objects
setEL
in interface Objects
setEL
in class StructSupport
propertyName
- property name to setvalue
- value to insertpublic Object call(PageContext pc, Collection.Key methodName, Object[] args) throws PageException
Objects
call
in interface Objects
call
in class StructSupport
methodName
- name of the method to callargs
- arguments to call method withPageException
public Object callWithNamedValues(PageContext pc, Collection.Key methodName, Struct args) throws PageException
Objects
callWithNamedValues
in interface Objects
callWithNamedValues
in class StructSupport
pc
- PageContextmethodName
- name of the methodargs
- Named Arguments for the methodPageException
Copyright © 2015 Lucee