com.sun.electric.database.variable
Class CodeExpression

java.lang.Object
  extended by com.sun.electric.database.variable.CodeExpression
All Implemented Interfaces:
java.io.Serializable

public class CodeExpression
extends java.lang.Object
implements java.io.Serializable

Class encapsulate expression in Java-like or Spice-like syntax

See Also:
Serialized Form

Nested Class Summary
static class CodeExpression.Code
          The type of Code that determines how this Variable's value should be evaluated.
 
Method Summary
 java.util.Set<Variable.Key> dependsOn()
           
 boolean equals(java.lang.Object o)
           
 java.lang.Object eval()
           
 CodeExpression.Code getCode()
           
 java.lang.String getExpr()
           
 java.lang.String getHSpiceText(boolean inPar)
           
 EvalSpice.ParseException getParseException()
           
 java.lang.String getSpiceText()
           
 java.lang.String getVerilogText()
           
 int hashCode()
           
 boolean isJava()
           
static void printStatistics(boolean verbose)
          Print statistics about CodeExpressions.
static CodeExpression read(IdReader reader)
          Read CodeExpression from SnapshotReader.
 java.lang.String toString()
           
static CodeExpression valueOf(java.lang.String expression, CodeExpression.Code code)
           
 void write(IdWriter writer)
          Write this CodeExpression to IdWriter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

valueOf

public static CodeExpression valueOf(java.lang.String expression,
                                     CodeExpression.Code code)

getCode

public CodeExpression.Code getCode()

isJava

public boolean isJava()

getExpr

public java.lang.String getExpr()

dependsOn

public java.util.Set<Variable.Key> dependsOn()

getParseException

public EvalSpice.ParseException getParseException()

getSpiceText

public java.lang.String getSpiceText()

getHSpiceText

public java.lang.String getHSpiceText(boolean inPar)

getVerilogText

public java.lang.String getVerilogText()

eval

public java.lang.Object eval()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

write

public void write(IdWriter writer)
           throws java.io.IOException
Write this CodeExpression to IdWriter.

Parameters:
writer - where to write.
Throws:
java.io.IOException

read

public static CodeExpression read(IdReader reader)
                           throws java.io.IOException
Read CodeExpression from SnapshotReader.

Parameters:
reader - from to write.
Throws:
java.io.IOException

printStatistics

public static void printStatistics(boolean verbose)
Print statistics about CodeExpressions.

Parameters:
verbose - print all CodeExpressions