Package com.microstrategy.utils
Class BridgeUtils
- java.lang.Object
-
- com.microstrategy.utils.BridgeUtils
-
public class BridgeUtils extends java.lang.ObjectThis 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.StringcreateArrayInstance(java.lang.String componentType, int length)java.lang.StringcreateInstance(java.lang.String className)Creates Instance.java.lang.StringcreateInstance(java.lang.String className, ObjectArray classTypes, ObjectArray values)Create Instance.intgetArrayLength(java.lang.String instanceKey)Returns the length of the array, if the instance is an array.java.lang.StringgetField(java.lang.String instanceKey, java.lang.String className, java.lang.String fieldName)Access the field.java.lang.ObjectgetInstance(java.lang.String key)Returns the instance.java.lang.StringgetValueFromArray(java.lang.String instanceKey, int index)Returns the value in the array by index.java.lang.Stringinvoke(java.lang.String instanceKey, java.lang.String className, java.lang.String methodName, ObjectArray classTypes, ObjectArray values)Invokes a method.static booleanparseBool(java.lang.String s)static byteparseByte(java.lang.String s)static charparseChar(java.lang.String s)static intparseInt(java.lang.String s)static shortparseShort(java.lang.String s)static java.lang.StringparseString(java.lang.String s)voidremoveInstance(java.lang.String key)Removes instance by keyvoidsetField(java.lang.String instanceKey, java.lang.String className, java.lang.String fieldName, java.lang.String serializedValue)voidsetValueToArray(java.lang.String instanceKey, int index, boolean value)voidsetValueToArray(java.lang.String instanceKey, int index, int value)voidsetValueToArray(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.ExceptionCreate 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.ExceptionCreates 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.ExceptionAccess 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.ExceptionInvokes 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)
-
-