org.jboss.byteman.test
Class TestScript

java.lang.Object
  extended by org.jboss.byteman.test.TestScript

public class TestScript
extends java.lang.Object

utility which parses and typechecks all rules in a rule script. usage : java org.jboss.byteman.TestScript [scriptfile] n.b. the byteman jar and any classes mentioned in the script rules need to be in the classpath


Field Summary
private  int errorCount
           
private  int parseErrorCount
           
private  int typeErrorCount
           
private  int typeWarningCount
           
(package private)  boolean verbose
           
private  int warningCount
           
 
Constructor Summary
private TestScript(boolean verbose)
           
 
Method Summary
private  void checkRules(java.lang.String[] packages, java.util.List<java.lang.String> ruleTexts, java.util.List<java.lang.String> ruleFiles)
           
 int installParamTypes(Rule rule, java.lang.String targetClassName, int access, java.lang.String candidateName, java.lang.String candidateDesc)
           
static void main(java.lang.String[] args)
           
(package private) static java.lang.String makeDescriptor(java.lang.reflect.Constructor constructor)
           
(package private) static java.lang.String makeDescriptor(java.lang.reflect.Method method)
           
 void testScript(java.lang.String[] packages, java.lang.String[] files, int firstFile)
           
private  void typeCheckAgainstMethodDeclaration(Rule rule, RuleScript script, java.lang.Class targetClass, java.lang.ClassLoader loader)
          method called to deal with interface rules or with overriding rules which fail to match a method of the declared class.
static void usage()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorCount

private int errorCount

warningCount

private int warningCount

parseErrorCount

private int parseErrorCount

typeErrorCount

private int typeErrorCount

typeWarningCount

private int typeWarningCount

verbose

boolean verbose
Constructor Detail

TestScript

private TestScript(boolean verbose)
Method Detail

main

public static void main(java.lang.String[] args)

usage

public static void usage()

testScript

public void testScript(java.lang.String[] packages,
                       java.lang.String[] files,
                       int firstFile)

checkRules

private void checkRules(java.lang.String[] packages,
                        java.util.List<java.lang.String> ruleTexts,
                        java.util.List<java.lang.String> ruleFiles)

typeCheckAgainstMethodDeclaration

private void typeCheckAgainstMethodDeclaration(Rule rule,
                                               RuleScript script,
                                               java.lang.Class targetClass,
                                               java.lang.ClassLoader loader)
method called to deal with interface rules or with overriding rules which fail to match a method of the declared class.

Parameters:
rule -
script -
targetClass -
loader -

makeDescriptor

static java.lang.String makeDescriptor(java.lang.reflect.Method method)

makeDescriptor

static java.lang.String makeDescriptor(java.lang.reflect.Constructor constructor)

installParamTypes

public int installParamTypes(Rule rule,
                             java.lang.String targetClassName,
                             int access,
                             java.lang.String candidateName,
                             java.lang.String candidateDesc)