railo.runtime.java
Class JavaObject

java.lang.Object
  extended by railo.runtime.java.JavaObject
All Implemented Interfaces:
Serializable, Dumpable, Castable, Objects, ObjectWrap
Direct Known Subclasses:
JavaProxy

public class JavaObject
extends Object
implements Objects, ObjectWrap

class to handle initialising and call native object from railo

See Also:
Serialized Form

Constructor Summary
JavaObject(VariableUtil variableUtil, Class clazz)
          constructor with className to load
JavaObject(VariableUtil variableUtil, Object object)
           
 
Method Summary
 Object call(PageContext pc, Collection.Key methodName, Object[] arguments)
          calls a method of the object
 Object call(PageContext pc, String methodName, Object[] arguments)
          calls a method of the object
 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)
          call a method of the Object with named arguments
 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)
          return property or getter of the ContextCollection
 Object get(PageContext pc, String propertyName, Object defaultValue)
          return property
 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 set(PageContext pc, String 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
 Object setEL(PageContext pc, String 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaObject

public JavaObject(VariableUtil variableUtil,
                  Class clazz)
constructor with className to load

Parameters:
variableUtil -
clazz -
Throws:
ExpressionException

JavaObject

public JavaObject(VariableUtil variableUtil,
                  Object object)
Method Detail

get

public Object get(PageContext pc,
                  String propertyName)
           throws PageException
Description copied from interface: Objects
return property or getter of the ContextCollection

Specified by:
get in interface Objects
Parameters:
pc - PageContext
propertyName - Name of the Property
Returns:
return value of the Property
Throws:
PageException
See Also:
Objects.get(railo.runtime.PageContext, java.lang.String)

get

public Object get(PageContext pc,
                  Collection.Key key)
           throws PageException
Description copied from interface: Objects
return property or getter of the ContextCollection

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property
Throws:
PageException
See Also:
Objects.get(railo.runtime.PageContext, railo.runtime.type.Collection.Key)

get

public Object get(PageContext pc,
                  String propertyName,
                  Object defaultValue)
Description copied from interface: Objects
return property

Specified by:
get in interface Objects
Parameters:
pc - PageContext
propertyName - Name of the Property
Returns:
return value of the Property

get

public Object get(PageContext pc,
                  Collection.Key key,
                  Object defaultValue)
Description copied from interface: Objects
return property

Specified by:
get in interface Objects
Parameters:
pc - PageContext
key - Name of the Property
Returns:
return value of the Property
See Also:
Objects.get(railo.runtime.PageContext, railo.runtime.type.Collection.Key, java.lang.Object)

set

public Object set(PageContext pc,
                  String propertyName,
                  Object value)
           throws PageException
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
set in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
Throws:
PageException
See Also:
Objects.set(railo.runtime.PageContext, java.lang.String, java.lang.Object)

set

public Object set(PageContext pc,
                  Collection.Key propertyName,
                  Object value)
           throws PageException
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
set in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
Throws:
PageException
See Also:
Objects.set(railo.runtime.PageContext, railo.runtime.type.Collection.Key, java.lang.Object)

setEL

public Object setEL(PageContext pc,
                    String propertyName,
                    Object value)
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
setEL in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
See Also:
Objects.setEL(railo.runtime.PageContext, java.lang.String, java.lang.Object)

setEL

public Object setEL(PageContext pc,
                    Collection.Key propertyName,
                    Object value)
Description copied from interface: Objects
sets a property (Data Member) value of the object

Specified by:
setEL in interface Objects
propertyName - property name to set
value - value to insert
Returns:
value set to property
See Also:
Objects.setEL(railo.runtime.PageContext, railo.runtime.type.Collection.Key, java.lang.Object)

call

public Object call(PageContext pc,
                   String methodName,
                   Object[] arguments)
            throws PageException
Description copied from interface: Objects
calls a method of the object

Specified by:
call in interface Objects
methodName - name of the method to call
arguments - arguments to call method with
Returns:
return value of the method
Throws:
PageException
See Also:
Objects.call(railo.runtime.PageContext, java.lang.String, java.lang.Object[])

call

public Object call(PageContext pc,
                   Collection.Key methodName,
                   Object[] arguments)
            throws PageException
Description copied from interface: Objects
calls a method of the object

Specified by:
call in interface Objects
methodName - name of the method to call
arguments - arguments to call method with
Returns:
return value of the method
Throws:
PageException
See Also:
Objects.call(railo.runtime.PageContext, railo.runtime.type.Collection.Key, java.lang.Object[])

callWithNamedValues

public Object callWithNamedValues(PageContext pc,
                                  String methodName,
                                  Struct args)
                           throws PageException
Description copied from interface: Objects
call a method of the Object with named arguments

Specified by:
callWithNamedValues in interface Objects
Parameters:
pc - PageContext
methodName - name of the method
args - Named Arguments for the method
Returns:
return result of the method
Throws:
PageException
See Also:
Objects.callWithNamedValues(railo.runtime.PageContext, java.lang.String, railo.runtime.type.Struct)

callWithNamedValues

public Object callWithNamedValues(PageContext pc,
                                  Collection.Key methodName,
                                  Struct args)
                           throws PageException
Description copied from interface: Objects
call a method of the Object with named arguments

Specified by:
callWithNamedValues in interface Objects
Parameters:
pc - PageContext
methodName - name of the method
args - Named Arguments for the method
Returns:
return result of the method
Throws:
PageException

getEmbededObject

public Object getEmbededObject()
                        throws PageException
Description copied from interface: ObjectWrap
returns embeded Object

Specified by:
getEmbededObject in interface ObjectWrap
Returns:
embeded Object
Throws:
PageException
See Also:
ObjectWrap.getEmbededObject()

toDumpData

public DumpData toDumpData(PageContext pageContext,
                           int maxlevel,
                           DumpProperties props)
Description copied from interface: Dumpable
method to print out information to a object as HTML

Specified by:
toDumpData in interface Dumpable
Returns:
HTML print out
See Also:
railo.runtime.dump.Dumpable#toDumpData(railo.runtime.PageContext, int)

getClazz

public Class getClazz()
Returns:
the containing Class

isInitalized

public boolean isInitalized()
Specified by:
isInitalized in interface Objects
Returns:
returns if embeded Object is init
See Also:
Objects.isInitalized()

castToString

public String castToString()
                    throws PageException
Description copied from interface: Castable
cast the castable value to a string, other than the Method toString, this Method can throw a Exception

Specified by:
castToString in interface Castable
Returns:
String representation of the Object
Throws:
PageException
See Also:
Castable.castToString()

castToString

public String castToString(String defaultValue)
Description copied from interface: Castable
cast the castable value to a string, return the default value, when the method is not castable

Specified by:
castToString in interface Castable
Returns:
String representation of the Object
See Also:
Castable.castToString(java.lang.String)

castToBooleanValue

public boolean castToBooleanValue()
                           throws PageException
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBooleanValue in interface Castable
Returns:
boolean Value representation of the Object
Throws:
PageException
See Also:
Castable.castToBooleanValue()

castToBoolean

public Boolean castToBoolean(Boolean defaultValue)
Description copied from interface: Castable
cast the castable value to a boolean value

Specified by:
castToBoolean in interface Castable
Returns:
boolean Value representation of the Object
See Also:
Castable.castToBoolean(java.lang.Boolean)

castToDoubleValue

public double castToDoubleValue()
                         throws PageException
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Returns:
double Value representation of the Object
Throws:
PageException
See Also:
Castable.castToDoubleValue()

castToDoubleValue

public double castToDoubleValue(double defaultValue)
Description copied from interface: Castable
cast the castable value to a double value

Specified by:
castToDoubleValue in interface Castable
Returns:
double Value representation of the Object
See Also:
Castable.castToDoubleValue(double)

castToDateTime

public DateTime castToDateTime()
                        throws PageException
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Returns:
date time representation of the Object
Throws:
PageException
See Also:
Castable.castToDateTime()

castToDateTime

public DateTime castToDateTime(DateTime defaultValue)
Description copied from interface: Castable
cast the castable value to a date time object

Specified by:
castToDateTime in interface Castable
Parameters:
defaultValue - returned when it is not possible to cast to a dateTime object
Returns:
date time representation of the Object
See Also:
Castable.castToDateTime(railo.runtime.type.dt.DateTime)

getEmbededObject

public Object getEmbededObject(Object def)
Description copied from interface: ObjectWrap
returns embeded Object EL

Specified by:
getEmbededObject in interface ObjectWrap
Returns:
embeded Object
See Also:
ObjectWrap.getEmbededObject(Object)

getObject

public Object getObject()
Returns:
the object

compareTo

public int compareTo(boolean b)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
railo.runtime.op.Castable#compare(boolean)

compareTo

public int compareTo(DateTime dt)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(railo.runtime.type.dt.DateTime)

compareTo

public int compareTo(double d)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(double)

compareTo

public int compareTo(String str)
              throws PageException
Specified by:
compareTo in interface Castable
Throws:
PageException
See Also:
Castable.compareTo(java.lang.String)


Copyright © 2012 Railo