this.getClass().getClassLoader() );
// make an automatic import for the current package
typeResolver.addImport( pkgDescr.getName() + ".*" );
typeResolver.addImport( "java.lang.*" );
final RuleBuilder builder = new RuleBuilder( );
final PackageBuilder pkgBulider = new PackageBuilder(pkg);
final PackageBuilderConfiguration conf = pkgBulider.getPackageBuilderConfiguration();
Dialect dialect = pkgBulider.getPackageBuilderConfiguration().getDialectRegistry().getDialectConfiguration( "java" ).getDialect();
RuleBuildContext context = new RuleBuildContext(conf, pkg, ruleDescr, conf.getDialectRegistry(), dialect);
builder.build( context );
Assert.assertTrue( context.getErrors().toString(),
context.getErrors().isEmpty() );
final Rule rule = context.getRule();