|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpy4j.ReturnObject
public class ReturnObject
A ReturnObject wraps a value returned by a method. If the value is a primitive, a primitive wrapper object (e.g., Integer) or a String, the value is kept in the primitiveObject field.
If the return value is an object, a key to the reference is kept in the name
field. This value can be retrieved by calling
Gateway.getObject(String)
with the key.
Various methods are defined to determine the type of the return value. For
example, if the return value is void, the name and primitiveObject fields are
null, but isVoid()
returns true.
ReturnObject objects can only be constructed through static factory methods
such as getListReturnObject(String, int)
.
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ReturnObject getArrayReturnObject(String name, int size)
public static ReturnObject getErrorReturnObject()
public static ReturnObject getListReturnObject(String name, int size)
public static ReturnObject getSetReturnObject(String name, int size)
public static ReturnObject getMapReturnObject(String name, int size)
public static ReturnObject getNullReturnObject()
public static ReturnObject getPrimitiveReturnObject(Object primitive)
public static ReturnObject getReferenceReturnObject(String name)
public static ReturnObject getVoidReturnObject()
public String getCommandPart()
public String getName()
public Object getPrimitiveObject()
public int getSize()
public boolean isArray()
public boolean isError()
public boolean isList()
public boolean isMap()
public boolean isNull()
public boolean isReference()
public boolean isSet()
public boolean isVoid()
public void setArray(boolean isArray)
public void setCommandPart(String commandPart)
public void setError(boolean isError)
public void setList(boolean isList)
public void setMap(boolean isMap)
public void setName(String name)
public void setNull(boolean isNull)
public void setPrimitiveObject(Object primitiveObject)
public void setReference(boolean isReference)
public void setSet(boolean isSet)
public void setSize(int size)
public void setVoid(boolean isVoid)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |