|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.starbase.starteam.SimpleKeyword
A Keyword object that encapsulates information about a File keyword.
When checking a file is added, checked-in or checked-out of the repository
keyword expansion may be applied to the contents of the file. For example,
an occurance of $Author$ in a file might be be replaced with
$Author: Fred$ upon checkout.
KeywordReader| Constructor Summary | |
SimpleKeyword(java.lang.String name,
java.lang.String value)
Create a new basic keyword object with the specified name and expansion value. |
|
| Method Summary | |
boolean |
equals(java.lang.Object source)
returns true if this object instance is equal to the source |
java.lang.String |
expand(java.lang.String linePrefix,
java.lang.String eol,
boolean expand)
Returns the expanded or unexpanded version of this keyword. |
java.lang.String |
getName()
Return the keyword name. |
java.lang.String |
getValue()
Return the keyword value. |
int |
hashCode()
returns a unique hash for all instances of this type |
boolean |
matches(java.lang.String line,
int start,
int[] endPos)
Returns true of this keyword is found in the specified line. |
boolean |
multiLine()
Return true if this keyword spans multiple lines. |
boolean |
stopExpanding()
Return true if upon encountering this keyword in a file that no further keyword expansion will occur. |
java.lang.String |
toXMLString()
Returns an XML representation of the keyword. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SimpleKeyword(java.lang.String name,
java.lang.String value)
name - the name of the keyword. E.g. "Author"value - the value to expand to. E.g. "Fred"| Method Detail |
public java.lang.String getName()
getName in interface Keywordpublic java.lang.String getValue()
getValue in interface Keywordpublic boolean stopExpanding()
$NoKeywords$.
stopExpanding in interface Keywordpublic boolean multiLine()
$Log$ keyword.
multiLine in interface Keyword
public boolean matches(java.lang.String line,
int start,
int[] endPos)
$ occurs.
matches in interface Keywordline - the line to search for this keywordstart - the position in the line (zero based) to start searchingendPos - and "output" array where the end of the keyword occurs.
public java.lang.String expand(java.lang.String linePrefix,
java.lang.String eol,
boolean expand)
expand in interface KeywordlinePrefix - the begining of the line in the souce leading up to
the keywordeol - the end-of-line convention used in the source fileexpand - true if the keyword is to be expanded and false for
unexpand
public java.lang.String toXMLString()
<keyword name="Author" value="Bob"/>
toXMLString in interface Keywordpublic boolean equals(java.lang.Object source)
equals in class java.lang.Objectsource - Object the source to comapre with
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||