com.puppycrawl.tools.checkstyle.checks
Class AbstractOption
- Serializable
public abstract class AbstractOption
implements Serializable
Abstract class that represents options.
AbstractOption | decode(String aStrRep) - Returns the option specified by a string representation.
|
protected abstract 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() -
|
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 abstract 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()