org.jboss.solder.core
Class VersionLoggerUtil

java.lang.Object
  extended by org.jboss.solder.core.VersionLoggerUtil

@Veto
public class VersionLoggerUtil
extends Object

Utility class for logging the version number of class based on package.

Author:
johnament

Constructor Summary
VersionLoggerUtil()
           
 
Method Summary
static String createVersionMessage(Class<?> clazz)
          Creates the version message for the given class using default format.
static String createVersionMessage(Class<?> clazz, String format)
          Creates the version message for the class based on the given format.
static void logVersionInformation(Class<?> clazz)
          Logs version information for the given class, using the default format.
static void logVersionInformation(Class<?> clazz, String formatPattern)
          By inspecting specified Class, getting package and specification version/implementation version we write a log message with the provided message format.
static void logVersionInformation(Class<?> clazz, String formatPattern, String logCategory)
          By inspecting specified Class, getting package and specification version/implementation version we write a log message with the provided message format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VersionLoggerUtil

public VersionLoggerUtil()
Method Detail

logVersionInformation

public static void logVersionInformation(Class<?> clazz,
                                         String formatPattern,
                                         String logCategory)
By inspecting specified Class, getting package and specification version/implementation version we write a log message with the provided message format.

Parameters:
clazz - the class where package will be determined from.
formatPattern - the string format.
logCategory - the category to log against.

logVersionInformation

public static void logVersionInformation(Class<?> clazz,
                                         String formatPattern)
By inspecting specified Class, getting package and specification version/implementation version we write a log message with the provided message format.

Parameters:
clazz - the class where package will be determined from.
formatPattern - the string format.

logVersionInformation

public static void logVersionInformation(Class<?> clazz)
Logs version information for the given class, using the default format.

Parameters:
clazz - the class where package will be determiend from.

createVersionMessage

public static String createVersionMessage(Class<?> clazz,
                                          String format)
Creates the version message for the class based on the given format. Given format should include 2 string format markers.

Parameters:
clazz - the class where package will be determiend from.
format - to compile against, should have 2 format markers.
Returns:
a string representation of the version information.

createVersionMessage

public static String createVersionMessage(Class<?> clazz)
Creates the version message for the given class using default format.

Parameters:
clazz - the class where package will be determiend from.
Returns:
a string representation of the version information.


Copyright © 2011 Seam Framework. All Rights Reserved.