|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.code.mojo.license.header.HeaderParser
public final class HeaderParser
The HeaderParser class is used to get header information about the current header defined in the given
file.
The achieve this it will use the HeaderDefinition associated to the type of the given file.
HeaderDefinition associated to this
HeaderParser.
HeaderDefinition| Constructor Summary | |
|---|---|
HeaderParser(FileContent fileContent,
HeaderDefinition headerDefinition,
String[] keywords)
Creates a HeaderParser object linked to the given file content and the associated header definition
based on the file type. |
|
| Method Summary | |
|---|---|
int |
getBeginPosition()
Returns the index position in the content where the header effectively starts. |
int |
getEndPosition()
Returns the index position in the content where the header effectively ends. |
FileContent |
getFileContent()
Returns the file content. |
HeaderDefinition |
getHeaderDefinition()
Returns the header definition associated to this header parser (itself bounded to a file). |
boolean |
gotAnyHeader()
Tells if the given file already contains a license header. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HeaderParser(FileContent fileContent,
HeaderDefinition headerDefinition,
String[] keywords)
HeaderParser object linked to the given file content and the associated header definition
based on the file type.
fileContent - The file content.headerDefinition - The associated header definition to use.
IllegalArgumentException - If the file content is null or if the header definition is null.| Method Detail |
|---|
public int getBeginPosition()
public int getEndPosition()
public boolean gotAnyHeader()
public FileContent getFileContent()
public HeaderDefinition getHeaderDefinition()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||