public class SubstEngineFactory
extends java.lang.Object
One category of utility methods deal with manipulating substitution varible types in the form of
strings and in the form of integers from the variable type enumeration in Substitution
.
Included in this category are:
#getSubstTypeStrs()
#typeToString(int)
#stringToType(String)
#intersectTypes(int,int)
#intersectTypes(String,String)
SubstEngine.createSubstitution(String)
and related methods. The
utility methods in this category are:
#encodeText(String)
#decodeText(String)
encodeIdentifier(String)
decodeIdentifier(String)
Constructor and Description |
---|
SubstEngineFactory() |
Modifier and Type | Method and Description |
---|---|
static SubstEngine |
anInstance()
Returns an instance of a SubstEngine.
|
static java.lang.String |
decodeIdentifier(java.lang.String encoded)
returns a decoded version of the given string representing a parsable identifier.
|
static java.lang.String |
encodeIdentifier(java.lang.String decoded)
encodes the given identifier so it may be parsed.
|
static void |
main(java.lang.String[] args)
converts substitutions from SDX 4.3 or older format to post SDX 4.3 format to new format.
|
public static SubstEngine anInstance()
SubstEngine.acquireParams(List,List)
, SubstEngine.classify(List,List,List,List)
,
and
SubstEngine.createSubstitution(String)
, may block a thread for a significant amount of time.
Consequently, this method returns a random instance of SubstEngine from the pool so several threads
can proceed with complex substitution operations in parallel.public static java.lang.String decodeIdentifier(java.lang.String encoded) throws java.lang.IllegalArgumentException
encoded
- java.lang.IllegalArgumentException
- if the input string is null or empty, or if the input contains a '$'
character which is not followed by four hex digitspublic static java.lang.String encodeIdentifier(java.lang.String decoded)
decoded
- java.lang.IllegalArgumentException
- if the input string is null or emptypublic static void main(java.lang.String[] args)
args
-