jasp.vbs
Class operator

java.lang.Object
  |
  +--jasp.vbs.operator

public class operator
extends java.lang.Object

VBScript has a full range of operators, including arithmetic operators, comparison operators, concatenation operators, and logical operators. Some ASP operators cannot be converted into Java operators directly, so we provide the operator class to implement these operators.


Constructor Summary
operator()
           
 
Method Summary
static variant get(variant v, java.lang.String name)
          Returns the property of the object.
static variant get(variant v, java.lang.String name, pVector pars)
          Returns the property or method of the object.
static boolean Greater(java.lang.String s1, java.lang.String s2)
          Compares two strings.
static boolean GreaterEQ(java.lang.String s1, java.lang.String s2)
          Compares two strings.
static variant invoke(variant v1, java.lang.String methodname, pVector pars)
          Invokes the method of the object.
static boolean Is(java.lang.Object object1, java.lang.Object object2)
          Compares two object reference variables.
static variant j2variant(java.lang.Object jarr)
          Converts the Java array to a variant.
static vbarray j2vbarray(java.lang.Object jarr)
          Converts the Java array to a vbarray.
static boolean Less(java.lang.String s1, java.lang.String s2)
          Compares two strings.
static boolean LessEQ(java.lang.String s1, java.lang.String s2)
          Compares two strings.
static void set(variant v, java.lang.String name, java.lang.Object value)
          Assigns the value to the property of the object.
static void set(variant v1, java.lang.String name, pVector pars, java.lang.Object value)
          Assigns the value to the property of the object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

operator

public operator()
Method Detail

Is

public static boolean Is(java.lang.Object object1,
                         java.lang.Object object2)
                  throws java.lang.Exception
Compares two object reference variables. Two variables can be made to refer to the same object in several ways.
Parameters:
object1 - Any object name.
object2 - Any object name.
Returns:
If both object1 and object2 refer to the same object, the result is True; if they do not, the result is False.

Greater

public static boolean Greater(java.lang.String s1,
                              java.lang.String s2)
Compares two strings. If s1 is greater than s2, result is True; otherwise, result is False; if s1 or s2 is NULL, result is False.

Less

public static boolean Less(java.lang.String s1,
                           java.lang.String s2)
Compares two strings. If s1 is lesser than s2, result is True; otherwise, result is False; if s1 or s2 is NULL, result is False.

GreaterEQ

public static boolean GreaterEQ(java.lang.String s1,
                                java.lang.String s2)
Compares two strings. If s1 is greater than or equals to s2, result is True; otherwise, result is False; if s1 or s2 is NULL, result is False.

LessEQ

public static boolean LessEQ(java.lang.String s1,
                             java.lang.String s2)
Compares two strings. If s1 is less than or equals to s2, result is True; otherwise, result is False; if S1 or S2 is NULL, result is False.

invoke

public static variant invoke(variant v1,
                             java.lang.String methodname,
                             pVector pars)
                      throws java.lang.Exception
Invokes the method of the object.
Parameters:
v1 - a variant containing the object.
methodname - the name of the method.
pars - the parameters of the method.
Returns:
a variant.
Throws:
if - the object is null, "Object required" error occurs.

get

public static variant get(variant v,
                          java.lang.String name)
                   throws java.lang.Exception
Returns the property of the object.
Parameters:
v - a variant containing the object.
name - the property or method name of the object.
Returns:
a variant.
Throws:
if - the object is null, "Object required" error occurs.

get

public static variant get(variant v,
                          java.lang.String name,
                          pVector pars)
                   throws java.lang.Exception
Returns the property or method of the object.
Parameters:
v - a variant containing the object.
name - the property or method name of the object.
pars - the parameters of the method.
Returns:
a variant.
Throws:
if - the object is null, "Object required" error occurs.

set

public static void set(variant v,
                       java.lang.String name,
                       java.lang.Object value)
                throws java.lang.Exception
Assigns the value to the property of the object.
Parameters:
v - a variant containing the object.
name - the property name of the object.
value - the value will be assigned to the object's property.
Throws:
if - the object is null, an error will occur.

set

public static void set(variant v1,
                       java.lang.String name,
                       pVector pars,
                       java.lang.Object value)
                throws java.lang.Exception
Assigns the value to the property of the object.
Parameters:
v1 - a variant containing the object.
name - the property name of the object.
pars - the parameters of the property.
value - the value will be assigned to the object's property.
Throws:
if - the object is null, an error will occur.

j2vbarray

public static vbarray j2vbarray(java.lang.Object jarr)
                         throws java.lang.Exception
Converts the Java array to a vbarray.
Parameters:
jarr - a Java array.
Returns:
a vbarray.

j2variant

public static variant j2variant(java.lang.Object jarr)
                         throws java.lang.Exception
Converts the Java array to a variant.