|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--mChaRM.PremChaRM.PreUtils
This class contains lots of utilities for PremChaRM
class.
It contains only static fields and methods.
Field Summary | |
static int |
dbgAllocation
Constant value for debugging. |
static int |
dbgGraphField
Constant value for debugging. |
static int |
dbgGraphMethod
Constant value for debugging. |
static int |
dbgMethodCall
Constant value for debugging. |
static int |
dbgOpenClasses
Constant value for debugging. |
static int |
dbgPrepClasses
Constant value for debugging. |
static int |
dbgPrintClasses
Constant value for debugging. |
static int |
dbgPrintExpression
Constant value for debugging. |
static int |
dbgSyntax
Constant value for debugging. |
static int |
dbgUtils
Constant value for debugging. |
static boolean[] |
debugLevel
Boolean array determining which debug levels have to be considered. |
Constructor Summary | |
PreUtils()
|
Method Summary | |
static java.util.Vector |
array2Vector(java.lang.Object[] inputArray)
This utility get a Vector object from an array one. |
static boolean |
equalsParameterType(OJMethod m1,
OJMethod m2)
This method tests if two OJMethod objects have the same parameter types. |
static boolean |
equalsParameterType(java.lang.String[] m1,
java.lang.String[] m2)
This method tests if two arrays of String have the same values. |
static java.util.Vector |
fieldHandling(StatementList body,
java.util.Vector parameters,
java.util.Vector ojFields)
This method returns all fields accessed by the given statements. |
static void |
getCalledMethods(OJMethod method,
java.util.Vector foundMethods,
java.util.Vector allEnvs)
This method returns all MethodCall expressions present in the given OJMethod object's body. |
(package private) static boolean |
overriddenMethod(OJMethod ojMethod1,
OJMethod ojMethod2)
Check if two given OJMethod objects are overridden. |
static void |
printDebug(java.lang.String Msg,
int type,
int level)
Print on standard output the given string if the cell of debugLevel[] specified by type is true. |
static void |
printExceptionText(java.lang.String Text,
java.lang.Throwable e)
Print on standard error the given string followed by the stack trace of the given expression. |
static void |
setName(java.lang.String name)
This method allow to change the name of the class instanciating PremChaRM class. |
Methods inherited from class java.lang.Object |
|
Field Detail |
public static final int dbgSyntax
public static final int dbgOpenClasses
public static final int dbgPrepClasses
public static final int dbgGraphMethod
public static final int dbgGraphField
public static final int dbgUtils
public static final int dbgPrintClasses
public static final int dbgPrintExpression
public static final int dbgAllocation
public static final int dbgMethodCall
public static final boolean[] debugLevel
false
that level must not be present, othewise it must be.
It is used by printDebug
method.Constructor Detail |
public PreUtils()
Method Detail |
public static void setName(java.lang.String name)
name
.
name
- the name of the class instanciating PremChaRM class.public static boolean equalsParameterType(java.lang.String[] m1, java.lang.String[] m2)
m1
- first array.m2
- second array.public static boolean equalsParameterType(OJMethod m1, OJMethod m2)
m1
- first OJMethod object.m2
- second OJMethod object.public static void getCalledMethods(OJMethod method, java.util.Vector foundMethods, java.util.Vector allEnvs)
getCalledMethodsByExpression
.
method
- starting OJMethod object.public static java.util.Vector fieldHandling(StatementList body, java.util.Vector parameters, java.util.Vector ojFields)
statementHandling
method)
to find used fields.
body
- starting statements to check (usually it is the body of a method).parameters
- a String Vector containing starting variables (usually these are a method's parameters).ojFields
- fields already declared (usually got with getAllFields).public static java.util.Vector array2Vector(java.lang.Object[] inputArray)
inputArray
- input Object array to be changed into Vector.static boolean overriddenMethod(OJMethod ojMethod1, OJMethod ojMethod2)
equalsParameterType
ojMethod1
- first OJMethod object.ojMethod2
- second OJMethod object.public static void printExceptionText(java.lang.String Text, java.lang.Throwable e)
Text
- String to be printed.e
- Exception whose stack trace must be printed.public static void printDebug(java.lang.String Msg, int type, int level)
Msg
- String to be printed.type
- index of debudLevel[] rappresenting the type of print.level
- rappresent the indent of print.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |