public class JavaObject extends Object implements Objects, ObjectWrap
Constructor and Description |
---|
JavaObject(VariableUtil variableUtil,
Class clazz)
constructor with className to load
|
JavaObject(VariableUtil variableUtil,
Object object) |
Modifier and Type | Method and Description |
---|---|
Object |
call(PageContext pc,
Collection.Key methodName,
Object[] arguments)
calls a method of the object
|
Object |
call(PageContext pc,
String methodName,
Object[] arguments) |
Object |
callWithNamedValues(PageContext pc,
Collection.Key methodName,
Struct args)
call a method of the Object with named arguments
|
Object |
callWithNamedValues(PageContext pc,
String methodName,
Struct args) |
Boolean |
castToBoolean(Boolean defaultValue)
cast the castable value to a boolean value
|
boolean |
castToBooleanValue()
cast the castable value to a boolean value
|
DateTime |
castToDateTime()
cast the castable value to a date time object
|
DateTime |
castToDateTime(DateTime defaultValue)
cast the castable value to a date time object
|
double |
castToDoubleValue()
cast the castable value to a double value
|
double |
castToDoubleValue(double defaultValue)
cast the castable value to a double value
|
String |
castToString()
cast the castable value to a string, other than the Method toString, this Method can throw a Exception
|
String |
castToString(String defaultValue)
cast the castable value to a string, return the default value, when the method is not castable
|
int |
compareTo(boolean b) |
int |
compareTo(DateTime dt) |
int |
compareTo(double d) |
int |
compareTo(String str) |
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
|
Object |
get(PageContext pc,
String propertyName) |
Object |
get(PageContext pc,
String propertyName,
Object defaultValue) |
Class |
getClazz() |
Object |
getEmbededObject()
returns embeded Object
|
Object |
getEmbededObject(Object def)
returns embeded Object EL
|
Object |
getObject() |
boolean |
isInitalized() |
Object |
set(PageContext pc,
Collection.Key propertyName,
Object value)
sets a property (Data Member) value of the object
|
Object |
setEL(PageContext pc,
Collection.Key propertyName,
Object value)
sets a property (Data Member) value of the object
|
DumpData |
toDumpData(PageContext pageContext,
int maxlevel,
DumpProperties props)
method to print out information to a object as HTML
|
public JavaObject(VariableUtil variableUtil, Class clazz)
variableUtil
- clazz
- ExpressionException
public JavaObject(VariableUtil variableUtil, Object object)
public Object get(PageContext pc, String propertyName) throws PageException
PageException
public Object get(PageContext pc, Collection.Key key) throws PageException
Objects
get
in interface Objects
pc
- PageContextkey
- Name of the PropertyPageException
public Object get(PageContext pc, String propertyName, Object defaultValue)
public Object get(PageContext pc, Collection.Key key, Object defaultValue)
Objects
public Object set(PageContext pc, Collection.Key propertyName, Object value) throws PageException
Objects
set
in interface Objects
propertyName
- property name to setvalue
- value to insertPageException
public Object setEL(PageContext pc, Collection.Key propertyName, Object value)
Objects
public Object call(PageContext pc, String methodName, Object[] arguments) throws PageException
PageException
public Object call(PageContext pc, Collection.Key methodName, Object[] arguments) throws PageException
Objects
call
in interface Objects
methodName
- name of the method to callarguments
- arguments to call method withPageException
public Object callWithNamedValues(PageContext pc, String methodName, Struct args) throws PageException
PageException
public Object callWithNamedValues(PageContext pc, Collection.Key methodName, Struct args) throws PageException
Objects
callWithNamedValues
in interface Objects
pc
- PageContextmethodName
- name of the methodargs
- Named Arguments for the methodPageException
public Object getEmbededObject() throws PageException
ObjectWrap
getEmbededObject
in interface ObjectWrap
PageException
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties props)
Dumpable
toDumpData
in interface Dumpable
public boolean isInitalized()
public String castToString() throws PageException
Castable
castToString
in interface Castable
PageException
public String castToString(String defaultValue)
Castable
castToString
in interface Castable
public boolean castToBooleanValue() throws PageException
Castable
castToBooleanValue
in interface Castable
PageException
public Boolean castToBoolean(Boolean defaultValue)
Castable
castToBoolean
in interface Castable
public double castToDoubleValue() throws PageException
Castable
castToDoubleValue
in interface Castable
PageException
public double castToDoubleValue(double defaultValue)
Castable
castToDoubleValue
in interface Castable
public DateTime castToDateTime() throws PageException
Castable
castToDateTime
in interface Castable
PageException
public DateTime castToDateTime(DateTime defaultValue)
Castable
castToDateTime
in interface Castable
defaultValue
- returned when it is not possible to cast to a dateTime objectpublic Object getEmbededObject(Object def)
ObjectWrap
getEmbededObject
in interface ObjectWrap
public int compareTo(boolean b) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(DateTime dt) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(double d) throws PageException
compareTo
in interface Castable
PageException
public int compareTo(String str) throws PageException
compareTo
in interface Castable
PageException
Copyright © 2015 Lucee