|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectgov.nist.core.GenericObject
public abstract class GenericObject
The base class from which all the other classes in the sipheader, sdpfields and sipmessage packages are extended. Provides a few utility funcitons such as indentation and pretty printing that all other classes benifit from.
メソッドの概要 | |
---|---|
java.lang.Object |
clone()
Make a clone of this object. |
java.lang.String |
debugDump()
Generic print formatting function: Does depth-first descent of the structure and recursively prints all non-private objects pointed to by this object. |
java.lang.String |
debugDump(int indent)
Formatter with a given starting indentation. |
abstract java.lang.String |
encode()
Get the string encoded version of this object |
boolean |
equals(java.lang.Object that)
An introspection based equality predicate for GenericObjects. |
static java.lang.Class |
getClassFromName(java.lang.String className)
|
Match |
getMatcher()
Return the match expression. |
static boolean |
isMySubclass(java.lang.Class other)
|
boolean |
match(java.lang.Object other)
An introspection based predicate matching using a template object. |
void |
merge(java.lang.Object mergeObject)
Recursively override the fields of this object with the fields of a new object. |
void |
replace(Match regexp,
GenericObject replacement)
Do a find and replace of objects based on regular expression matching of fields. |
void |
replace(Match regexp,
GenericObjectList replacement)
Do a recursive find and replace of objects pointed to by this object based on regular expression pattern matching. |
void |
replace(java.lang.String objectText,
GenericObject replacement,
boolean matchSubstring)
Do a recursive find and replace of objects pointed to by this object. |
void |
replace(java.lang.String objectText,
GenericObjectList replacement,
boolean matchSubstring)
Do a recursive find and replace of objects pointed to by this object. |
void |
setMatcher(Match matchExpression)
Set the pattern matcher. |
クラス java.lang.Object から継承されたメソッド |
---|
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
メソッドの詳細 |
---|
public void setMatcher(Match matchExpression)
public Match getMatcher()
public static java.lang.Class getClassFromName(java.lang.String className)
public static boolean isMySubclass(java.lang.Class other)
public java.lang.Object clone()
java.lang.Object
内の clone
public void merge(java.lang.Object mergeObject)
mergeObject
- is the replacement object. The override
obect must be of the same class as this object.
Set any fields that you do not want to override as null in the
mergeOject object.public boolean equals(java.lang.Object that)
java.lang.Object
内の equals
that
- is the other object to test against.
public boolean match(java.lang.Object other)
other
- the match pattern to test against. The match object
has to be of the same type (class). Primitive types
and non-sip fields that are non null are matched for equality.
Null in any field matches anything. Some book-keeping fields
are ignored when making the comparison.public java.lang.String debugDump()
public java.lang.String debugDump(int indent)
public abstract java.lang.String encode()
public void replace(java.lang.String objectText, GenericObject replacement, boolean matchSubstring) throws java.lang.IllegalArgumentException
objectText
- is the canonical string representation of
the object that we want to replace.replacement
- is the object that we want to replace it
with.matchSubstring
- a boolean which tells if we should match
a substring of the target object
A replacement will occur if a portion of the structure is found
with matching encoded text (a substring if matchSubstring is true)
as objectText and with the same class as replacement.
java.lang.IllegalArgumentException
public void replace(java.lang.String objectText, GenericObjectList replacement, boolean matchSubstring) throws java.lang.IllegalArgumentException
objectText
- Canonical string representation of the
portion we want to replace.replacement
- object we want to replace this portion with.
A replacement will occur if a portion of the structure is found
with a match of the encoded text
with objectText and with the same class as replacement.matchSubstring
- is true if we want to match objectText
as a substring of the encoded target text.
(i.e. an object is a candidate for replacement if
objectText is a substring of
candidate.encode() && candidate.class.equals(replacement.class)
otherwise the match test is an equality test.)
java.lang.IllegalArgumentException
public void replace(Match regexp, GenericObjectList replacement) throws java.lang.IllegalArgumentException
regexp
- regular expression for the object we want to find.
This is generated using a regular expression matching package
such as the apache regexp package.replacement
- object we want to replace this portion with.
A replacement will occur if a portion of the structure is found
with a match of the encoded text
with objectText and with the same class as replacement.
java.lang.IllegalArgumentException
public void replace(Match regexp, GenericObject replacement) throws java.lang.IllegalArgumentException
regexp
- is the match expression (i.e. implementation of
the Match interface) for
the object that we want to replace.replacement
- is the object that we want to replace it
with.
A replacement will occur if a portion of the structure is found
that matches according to the given regexp and if the class of
the replaced field matches the replacement.
java.lang.IllegalArgumentException
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |