Package com.microstrategy.utils
Class BridgeUtils
- java.lang.Object
-
- com.microstrategy.utils.BridgeUtils
-
public class BridgeUtils extends java.lang.Object
This class is only used internally for BridgeUtils .Net project.- Since:
- MicroStrategy Web 9.0.0
-
-
Constructor Summary
Constructors Constructor Description BridgeUtils()
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createArrayInstance(java.lang.String componentType, int length)
java.lang.String
createInstance(java.lang.String className)
Creates Instance.java.lang.String
createInstance(java.lang.String className, ObjectArray classTypes, ObjectArray values)
Create Instance.int
getArrayLength(java.lang.String instanceKey)
Returns the length of the array, if the instance is an array.java.lang.String
getField(java.lang.String instanceKey, java.lang.String className, java.lang.String fieldName)
Access the field.java.lang.Object
getInstance(java.lang.String key)
Returns the instance.java.lang.String
getValueFromArray(java.lang.String instanceKey, int index)
Returns the value in the array by index.java.lang.String
invoke(java.lang.String instanceKey, java.lang.String className, java.lang.String methodName, ObjectArray classTypes, ObjectArray values)
Invokes a method.static boolean
parseBool(java.lang.String s)
static byte
parseByte(java.lang.String s)
static char
parseChar(java.lang.String s)
static int
parseInt(java.lang.String s)
static short
parseShort(java.lang.String s)
static java.lang.String
parseString(java.lang.String s)
void
removeInstance(java.lang.String key)
Removes instance by keyvoid
setField(java.lang.String instanceKey, java.lang.String className, java.lang.String fieldName, java.lang.String serializedValue)
void
setValueToArray(java.lang.String instanceKey, int index, boolean value)
void
setValueToArray(java.lang.String instanceKey, int index, int value)
void
setValueToArray(java.lang.String instanceKey, int index, java.lang.String value)
-
-
-
Method Detail
-
createInstance
public java.lang.String createInstance(java.lang.String className, ObjectArray classTypes, ObjectArray values) throws java.lang.Exception
Create Instance.- Parameters:
className
- The name of the Class.classTypes
- The parameter types.values
- The parameter values.- Returns:
- The instance key.
- Throws:
java.lang.Exception
-
createArrayInstance
public java.lang.String createArrayInstance(java.lang.String componentType, int length) throws java.lang.Exception
- Throws:
java.lang.Exception
-
createInstance
public java.lang.String createInstance(java.lang.String className) throws java.lang.Exception
Creates Instance.- Parameters:
className
- The class name of the instance.- Returns:
- the instance key.
- Throws:
java.lang.Exception
-
removeInstance
public void removeInstance(java.lang.String key)
Removes instance by key- Parameters:
key
- The key of the instance
-
getField
public java.lang.String getField(java.lang.String instanceKey, java.lang.String className, java.lang.String fieldName) throws java.lang.Exception
Access the field.- Parameters:
instanceKey
- The instance key indicates the instance we are accessing the field on. If the field is a static field, this can be null.className
- The name of the class.fieldName
- The name fo the field.- Returns:
- the serialized string indicates the return value.
- Throws:
java.lang.Exception
-
setField
public void setField(java.lang.String instanceKey, java.lang.String className, java.lang.String fieldName, java.lang.String serializedValue) throws java.lang.Exception
- Throws:
java.lang.Exception
-
invoke
public java.lang.String invoke(java.lang.String instanceKey, java.lang.String className, java.lang.String methodName, ObjectArray classTypes, ObjectArray values) throws java.lang.Exception
Invokes a method.- Parameters:
instanceKey
- The instance key indicates the instance.className
- The name of the class.methodName
- The name of the method we are calling.classTypes
- The parameter types.values
- The parameter values.- Returns:
- the serialized string indicates the return value.
- Throws:
java.lang.Exception
-
getArrayLength
public int getArrayLength(java.lang.String instanceKey)
Returns the length of the array, if the instance is an array.- Parameters:
instanceKey
- The instance key of the array.- Returns:
- the length of the array, if the instance is an array.
-
getValueFromArray
public java.lang.String getValueFromArray(java.lang.String instanceKey, int index)
Returns the value in the array by index.- Parameters:
instanceKey
- The instance key of the array.index
- The index of the array.- Returns:
- the value in the array by index.
-
setValueToArray
public void setValueToArray(java.lang.String instanceKey, int index, boolean value)
-
setValueToArray
public void setValueToArray(java.lang.String instanceKey, int index, java.lang.String value)
-
setValueToArray
public void setValueToArray(java.lang.String instanceKey, int index, int value)
-
getInstance
public java.lang.Object getInstance(java.lang.String key)
Returns the instance.- Parameters:
key
- The key of the instance.- Returns:
- the instance if found. Otherwise returns null.
-
parseInt
public static int parseInt(java.lang.String s)
-
parseShort
public static short parseShort(java.lang.String s)
-
parseBool
public static boolean parseBool(java.lang.String s)
-
parseChar
public static char parseChar(java.lang.String s)
-
parseByte
public static byte parseByte(java.lang.String s)
-
parseString
public static java.lang.String parseString(java.lang.String s)
-
-