net.logAnalyzer.converters
Class ConverterDefinition

java.lang.Object
  extended bynet.logAnalyzer.converters.ConverterDefinition

public class ConverterDefinition
extends java.lang.Object

This class contains the definition of a converter.

Version:
0.1
Author:
Karim REFEYTON

Constructor Summary
ConverterDefinition(java.lang.String key, java.lang.Class converterClass, boolean option, java.lang.String label)
           
ConverterDefinition(java.lang.String key, java.lang.String classname, boolean option, boolean message, java.lang.String label)
           
 
Method Summary
 LAConverter createConverterInstance(java.lang.String value)
          Creates a new converter instance.
 java.lang.Class getConverterClass()
          Returns the converter class.
 java.lang.String getKey()
          Return the definition key.
 java.lang.String getLabel()
          Returns the converter label.
 boolean hasOption()
          Returns true if the converter has options.
 boolean isMessage()
          Returns true if the converter is a messageLabel converter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterDefinition

public ConverterDefinition(java.lang.String key,
                           java.lang.String classname,
                           boolean option,
                           boolean message,
                           java.lang.String label)
                    throws java.lang.ClassNotFoundException

ConverterDefinition

public ConverterDefinition(java.lang.String key,
                           java.lang.Class converterClass,
                           boolean option,
                           java.lang.String label)
Method Detail

getKey

public java.lang.String getKey()
Return the definition key.

Returns:
The definition key.

getLabel

public java.lang.String getLabel()
Returns the converter label.

Returns:
Converter label.

getConverterClass

public java.lang.Class getConverterClass()
Returns the converter class.

Returns:
Converter class.

hasOption

public boolean hasOption()
Returns true if the converter has options.

Returns:
true if the converter has options; false otherwise.

isMessage

public boolean isMessage()
Returns true if the converter is a messageLabel converter.

A messageLabel is a special field which could be extended during parsing process.

For example, if you log a Java exception, the exception may be written on more than one line, so the parsing process has to concat several lines to get the complete messageLabel.

Returns:
true if the converter is used to parse a messageLabel; false otherwise.

createConverterInstance

public LAConverter createConverterInstance(java.lang.String value)
                                    throws PatternParsingException
Creates a new converter instance.

Parameters:
value - Name of the converter.
Returns:
New instance.
Throws:
PatternParsingException


Copyright © 2006 null. All Rights Reserved.