Package org.apache.logging.log4j.message
Class SimpleMessage
java.lang.Object
org.apache.logging.log4j.message.SimpleMessage
- All Implemented Interfaces:
Serializable,CharSequence,Message,org.apache.logging.log4j.util.StringBuilderFormattable
public class SimpleMessage
extends Object
implements Message, org.apache.logging.log4j.util.StringBuilderFormattable, CharSequence
The simplest possible implementation of Message. It just returns the String given as the constructor argument.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBasic constructor.SimpleMessage(CharSequence charSequence) Constructor that includes the message.SimpleMessage(String message) Constructor that includes the message. -
Method Summary
Modifier and TypeMethodDescriptioncharcharAt(int index) booleanvoidformatTo(StringBuilder buffer) Returns the message.Returns the message.Object[]Returns null since there are no parameters.Always returns null.inthashCode()intlength()subSequence(int start, int end) toString()Methods inherited from interface java.lang.CharSequence
chars, codePoints, isEmpty
-
Constructor Details
-
SimpleMessage
public SimpleMessage()Basic constructor. -
SimpleMessage
Constructor that includes the message.- Parameters:
message- The String message.
-
SimpleMessage
Constructor that includes the message.- Parameters:
charSequence- The CharSequence message.
-
-
Method Details
-
getFormattedMessage
Returns the message.- Specified by:
getFormattedMessagein interfaceMessage- Returns:
- the message.
-
formatTo
- Specified by:
formatToin interfaceorg.apache.logging.log4j.util.StringBuilderFormattable
-
getFormat
Returns the message. -
getParameters
Returns null since there are no parameters.- Specified by:
getParametersin interfaceMessage- Returns:
- null.
-
equals
-
hashCode
public int hashCode() -
toString
- Specified by:
toStringin interfaceCharSequence- Overrides:
toStringin classObject
-
getThrowable
Always returns null.- Specified by:
getThrowablein interfaceMessage- Returns:
- null
-
length
public int length()- Specified by:
lengthin interfaceCharSequence
-
charAt
public char charAt(int index) - Specified by:
charAtin interfaceCharSequence
-
subSequence
- Specified by:
subSequencein interfaceCharSequence
-