com.puppycrawl.tools.checkstyle.checks
Class AbstractOption
java.lang.Object
com.puppycrawl.tools.checkstyle.checks.AbstractOption
- Serializable
public abstract class AbstractOption
extends java.lang.Object
implements Serializable
Abstract class that represents options.
- Oliver Burn
- Rick Giles
AbstractOption | decode(String aStrRep) - Returns the option specified by a string representation.
|
protected Map | getStrToOpt() - Returns the map from string representations to options.
|
protected Object | readResolve() - Ensures that we don't get multiple instances of one AbstractOption
during deserialization.
|
String | toString() - Returns the string representation of this AbstractOption.
|
AbstractOption
protected AbstractOption(String aStrRep)
Creates a new AbstractOption
instance.
aStrRep
- the string representation
decode
public AbstractOption decode(String aStrRep)
Returns the option specified by a string representation. If no
option exists then null is returned.
aStrRep
- the String representation to parse
- the
AbstractOption
value represented by
aStrRep, or null if none exists.
getStrToOpt
protected Map getStrToOpt()
Returns the map from string representations to options.
Map
from strings to options.
readResolve
protected Object readResolve()
throws ObjectStreamException
Ensures that we don't get multiple instances of one AbstractOption
during deserialization. See Section 3.6 of the Java Object
Serialization Specification for details.
- the serialization replacement object
toString
public String toString()
Returns the string representation of this AbstractOption.
java.lang.Object