Class LogPolicySupport
- java.lang.Object
-
- org.powermock.mockpolicies.support.LogPolicySupport
-
public class LogPolicySupport extends java.lang.Object
A support class for mock policies dealing with logging frameworks.
-
-
Constructor Summary
Constructors Constructor Description LogPolicySupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.reflect.Method[]
getLoggerMethods(java.lang.String fullyQualifiedClassName, java.lang.String methodName, java.lang.String logFramework)
Get the methods that should be mocked.java.lang.Class<?>
getType(java.lang.String name, java.lang.String logFramework)
Get the class type representing the fully-qualified name.
-
-
-
Method Detail
-
getLoggerMethods
public java.lang.reflect.Method[] getLoggerMethods(java.lang.String fullyQualifiedClassName, java.lang.String methodName, java.lang.String logFramework)
Get the methods that should be mocked.- Parameters:
fullyQualifiedClassName
- The fully-qualified name to the class that contains the method.methodName
- The name of the method that should be mocked.logFramework
- The log framework that should be printed if the classfullyQualifiedClassName
cannot be found.- Returns:
- The array of
Method
's that should be mocked.
-
getType
public java.lang.Class<?> getType(java.lang.String name, java.lang.String logFramework) throws java.lang.Exception
Get the class type representing the fully-qualified name.- Parameters:
name
- The fully-qualified name of a class to get.logFramework
- The log framework that should be printed if the class cannot be found.- Returns:
- The class representing the fully-qualified name.
- Throws:
java.lang.Exception
- If something unexpected goes wrong, for example if the class cannot be found.
-
-