Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.checks
Class LineSeparatorOption  view LineSeparatorOption download LineSeparatorOption.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.checks.AbstractOption
      extended bycom.puppycrawl.tools.checkstyle.checks.LineSeparatorOption
All Implemented Interfaces:
java.io.Serializable

public final class LineSeparatorOption
extends AbstractOption

Represents the options for line separator settings.


Field Summary
static LineSeparatorOption CR
          Mac-style line separators.
static LineSeparatorOption CRLF
          Windows-style line separators.
static LineSeparatorOption LF
          Unix-style line separators.
private  java.lang.String mLineSeparator
          the line separator representation
private static java.util.Map STR_TO_OPT
          maps from a string representation to an option
static LineSeparatorOption SYSTEM
          System default line separators.
 
Fields inherited from class com.puppycrawl.tools.checkstyle.checks.AbstractOption
 
Constructor Summary
private LineSeparatorOption(java.lang.String aStrRep, java.lang.String aSep)
          Creates a new LineSeparatorOption instance.
 
Method Summary
protected  java.util.Map getStrToOpt()
          Returns the map from string representations to options.
 int length()
           
 boolean matches(byte[] aBytes)
           
 
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.AbstractOption
decode, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STR_TO_OPT

private static final java.util.Map STR_TO_OPT
maps from a string representation to an option


CRLF

public static final LineSeparatorOption CRLF
Windows-style line separators.


CR

public static final LineSeparatorOption CR
Mac-style line separators.


LF

public static final LineSeparatorOption LF
Unix-style line separators.


SYSTEM

public static final LineSeparatorOption SYSTEM
System default line separators.


mLineSeparator

private final java.lang.String mLineSeparator
the line separator representation

Constructor Detail

LineSeparatorOption

private LineSeparatorOption(java.lang.String aStrRep,
                            java.lang.String aSep)
Creates a new LineSeparatorOption instance.

Method Detail

matches

public boolean matches(byte[] aBytes)

length

public int length()

getStrToOpt

protected java.util.Map getStrToOpt()
Description copied from class: AbstractOption
Returns the map from string representations to options.

Specified by:
getStrToOpt in class AbstractOption