| java.lang.Object org.netbeans.installer.infra.utils.comment.handlers.BlockFileHandler
All known Subclasses: org.netbeans.installer.infra.utils.comment.handlers.SourcesFileHandler, org.netbeans.installer.infra.utils.comment.handlers.HtmlFileHandler, org.netbeans.installer.infra.utils.comment.handlers.JspFileHandler, org.netbeans.installer.infra.utils.comment.handlers.XmlFileHandler,
BlockFileHandler | abstract public class BlockFileHandler implements FileHandler(Code) | | The base class for ahndling file types in which block comments are used, such as
java source files or xml documents.
author: Kirill Sorokin |
commentEnd | final protected String commentEnd(Code) | | The comment closing string.
|
commentPattern | final protected Pattern commentPattern(Code) | | The regular expression pattern which matches the initial comment.
|
commentPrefix | final protected String commentPrefix(Code) | | The prefix which should be used for each line in the comment. If there should
be no prefix - an empty line should be used.
|
commentStart | final protected String commentStart(Code) | | The comment opening string.
|
contents | protected String contents(Code) | | The cached file contents.
|
BlockFileHandler | protected BlockFileHandler(Pattern commentPattern, String commentStart, String commentPrefix, String commentEnd)(Code) | | The constructor which should be called by the extending classes. It merely
sets the class fields, performnig some basic validation.
Parameters: commentPattern - The regular expression pattern which matches theinitial comment. Parameters: commentStart - The comment opening string. Parameters: commentPrefix - The prefix which should be used for each line in thecomment. Parameters: commentEnd - The comment closing string. throws: java.lang.IllegalArgumentException - if the parameters validationfails. |
getCommentPosition | protected int getCommentPosition()(Code) | | Calculates the proper initial comment position. This is used in the
insertComment method to devise the position at which to insert
the new comment. Extending classes may want to override this method to
provide initial comment position that is correct for their file type (e.g. in
xml documents the comment should appear only after the
<?xml ... ?> tag.
The proper position for the initial comment. |
getCurrentComment | final public String getCurrentComment()(Code) | | |
insertComment | final public void insertComment(String text, int lineLength)(Code) | | |
updateComment | final public void updateComment(String text, int lineLength)(Code) | | |
|
|