com.sri.oaa2.icl
Class GenerateManualConstruction

java.lang.Object
  |
  +--com.sri.oaa2.icl.GenerateManualConstruction

public class GenerateManualConstruction
extends java.lang.Object

Given a well-formed String, s--that is, one for which IclTerm.fromString(true, s) does not throw an exception--and where s contains no icldataq() type terms, this class can be used to generate a new String which represents the manual construction of the term represented by s.

For example, calling getInstance().from("a") would result in the String new IclStr("a") This is most useful when you have a long String for which you currently call IclTerm.fromString(). The reason is because calling fromString() is much slower than using the equivalent constructor calls, due to the parsing overhead.


Method Summary
 java.lang.String from(java.lang.String s)
          Generate a String representing the construction of the IclTerm represented by s.
static GenerateManualConstruction getInstance()
          Get an instance of this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

from

public java.lang.String from(java.lang.String s)
Generate a String representing the construction of the IclTerm represented by s. The construction will use Java constructors.

Parameters:
s - The String to convert
Returns:
String a String which can be used to replace an existing call to IclTerm.fromString

getInstance

public static GenerateManualConstruction getInstance()
Get an instance of this class.