com.ikokoon.serenity
Class Configuration

java.lang.Object
  extended by com.ikokoon.serenity.Configuration

public class Configuration
extends java.lang.Object

The configuration object holds the parameters for the processing, some from the system parameters that can be set by the user and some internal like packages to be excluded always for example java.lang.

Since:
05.10.09
Version:
01.00
Author:
Michael Couck

Field Summary
 java.util.List<java.lang.Class<org.objectweb.asm.ClassVisitor>> classAdapters
          The class adapters that the system will chain.
 java.util.Set<java.lang.String> excludedPackages
          Patterns in class names that are excluded from enhancement.
 java.util.Set<java.lang.String> includedPackages
          Packages that are included in the enhancement.
 org.apache.log4j.Logger logger
          The logger for the class.
 
Method Summary
 boolean excluded(java.lang.String string)
          Checks to see if the class is included in the classes that can be enhanced, so for example java.lang is excluded.
 java.lang.String getClassPath()
          Access to the classpath of the system.
static Configuration getConfiguration()
          System wide access to the configuration.
 java.lang.String getProperty(java.lang.String name)
          Access to the system properties.
 boolean included(java.lang.String string)
          Checks to see that the class name is included in the packages that are to be included.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public org.apache.log4j.Logger logger
The logger for the class.


includedPackages

public java.util.Set<java.lang.String> includedPackages
Packages that are included in the enhancement.


excludedPackages

public java.util.Set<java.lang.String> excludedPackages
Patterns in class names that are excluded from enhancement.


classAdapters

public java.util.List<java.lang.Class<org.objectweb.asm.ClassVisitor>> classAdapters
The class adapters that the system will chain.

Method Detail

getConfiguration

public static Configuration getConfiguration()
System wide access to the configuration.

Returns:
the configuration for the system

included

public boolean included(java.lang.String string)
Checks to see that the class name is included in the packages that are to be included.

Parameters:
string - the string to check for pattern inclusion
Returns:
whether the string is included in the pattern list

excluded

public boolean excluded(java.lang.String string)
Checks to see if the class is included in the classes that can be enhanced, so for example java.lang is excluded.

Parameters:
string - the string that is to be checked for exclusion
Returns:
whether the class is excluded and should not be used

getProperty

public java.lang.String getProperty(java.lang.String name)
Access to the system properties. This method can be extended to include other properties like in files etc.

Parameters:
name - the name of the property
Returns:
the system property with the specified name

getClassPath

public java.lang.String getClassPath()
Access to the classpath of the system. Included in the classpath are the jars that were manually added by the user.

Returns:
the classpath of the system including the Surefire classpath


Copyright © 2010. All Rights Reserved.