|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.aspectj.org.eclipse.jdt.internal.formatter.comment.CommentLine
public abstract class CommentLine
General comment line in a comment region.
| Field Summary | |
|---|---|
protected static java.lang.String |
NON_FORMAT_START_PREFIX
Prefix of non-formattable comment lines |
| Fields inherited from interface org.aspectj.org.eclipse.jdt.internal.formatter.comment.IBorderAttributes |
|---|
BORDER_LOWER, BORDER_UPPER |
| Constructor Summary | |
|---|---|
protected |
CommentLine(CommentRegion parent)
Creates a new comment line. |
| Method Summary | |
|---|---|
protected abstract void |
adapt(CommentLine previous)
Adapts the line attributes from the previous line in the comment region. |
protected void |
append(CommentRange range)
Appends the specified comment range to this comment line. |
protected CommentRange |
formatLine(CommentLine predecessor,
CommentRange last,
java.lang.String indentation,
int line)
Formats this comment line as content line. |
protected void |
formatLowerBorder(CommentRange range,
java.lang.String indentation,
int length)
Formats this comment line as end line having a lower border consisting of content line prefixes. |
protected void |
formatUpperBorder(CommentRange range,
java.lang.String indentation,
int length)
Formats this comment line as start line having an upper border consisting of content line prefixes. |
protected abstract java.lang.String |
getContentPrefix()
Returns the line prefix of content lines. |
protected abstract java.lang.String |
getEndingPrefix()
Returns the line prefix of end lines. |
protected CommentRange |
getFirst()
Returns the first comment range in this comment line. |
protected java.lang.String |
getIndentationReference()
Returns the indentation reference string for this line. |
protected CommentRange |
getLast()
Returns the last comment range in this comment line. |
protected CommentRegion |
getParent()
Returns the parent comment region of this comment line. |
protected int |
getSize()
Returns the number of comment ranges in this comment line. |
protected abstract java.lang.String |
getStartingPrefix()
Returns the line prefix of start lines. |
protected boolean |
hasAttribute(int attribute)
Is the attribute attribute true? |
protected abstract void |
scanLine(int line)
Scans this comment line for comment range boundaries. |
protected void |
setAttribute(int attribute)
Set the attribute attribute to true. |
protected void |
tokenizeLine(int line)
Tokenizes this comment line into comment ranges |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String NON_FORMAT_START_PREFIX
| Constructor Detail |
|---|
protected CommentLine(CommentRegion parent)
parent - comment region to create the comment line for| Method Detail |
|---|
protected abstract void adapt(CommentLine previous)
previous - the previous comment line in the comment regionprotected void append(CommentRange range)
range - comment range to append to this line
protected CommentRange formatLine(CommentLine predecessor,
CommentRange last,
java.lang.String indentation,
int line)
predecessor - the predecessor comment line in the comment regionlast - the most recently processed comment rangeindentation - the indentation of the comment regionline - the index of this comment line in the comment region
protected void formatLowerBorder(CommentRange range,
java.lang.String indentation,
int length)
range - last comment range of the last comment line in the
comment regionindentation - the indentation of the comment regionlength - the maximal length of text in this comment region
measured in average character widths
protected void formatUpperBorder(CommentRange range,
java.lang.String indentation,
int length)
range - the first comment range in the comment regionindentation - the indentation of the comment regionlength - the maximal length of text in this comment region
measured in average character widthsprotected abstract java.lang.String getContentPrefix()
protected abstract java.lang.String getEndingPrefix()
protected final CommentRange getFirst()
protected java.lang.String getIndentationReference()
protected final CommentRange getLast()
protected final CommentRegion getParent()
protected final int getSize()
protected abstract java.lang.String getStartingPrefix()
protected final boolean hasAttribute(int attribute)
attribute true?
attribute - the attribute to get.
true iff this attribute is true,
false otherwise.protected abstract void scanLine(int line)
line - the index of this line in the comment regionprotected final void setAttribute(int attribute)
attribute to true.
attribute - the attribute to set.protected void tokenizeLine(int line)
line - the index of this line in the comment regionpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||