org.inxar.jenesis
Interface Codeable

All Known Subinterfaces:
AbstractMethod, Accessor, ArrayAccess, ArrayInitializer, ArrayType, Assign, Binary, Blank, Block, BooleanLiteral, Break, ByteLiteral, Case, Cast, Catch, CharLiteral, ClassDeclaration, ClassField, ClassLiteral, ClassMethod, ClassType, Comment, CompilationUnit, ConditionalStatement, Constant, Constructor, Continue, Declaration, Default, DocumentationComment, DoubleLiteral, DoWhile, Else, ElseIf, Empty, Expression, ExpressionStatement, False, Field, FieldAccess, Finally, FloatLiteral, For, FormalParameter, Freeform, If, Import, InitializationDeclaration, InnerClass, Interface, IntLiteral, Invoke, Let, Literal, LocalBlock, LocalClass, LongLiteral, Member, Method, Namespace, NewAnonymousClass, NewArray, NewClass, Null, OctalLiteral, PackageClass, PrimitiveType, Return, ScientificLiteral, ShortLiteral, Statement, StaticInitializer, StringLiteral, Switch, Synchronized, Ternary, Throw, True, Try, Type, TypeDeclaration, Unary, UnicodeLiteral, Variable, While
All Known Implementing Classes:
com.inxar.jenesis.MVM.MCodeable

public interface Codeable

Codeable is a core interface which nearly all other interfaces extend. Objects that implement this interface are expected to know how to render themselves as source code to a CodeWriter. Any Codeable is be commentable as well.


Method Summary
 Comment getComment()
          Gets the comment for this Codeable object.
 void setComment(int type, java.lang.String text)
          Sets the comment to the given type and text.
 CodeWriter toCode(CodeWriter out)
          Renders the codeable object to the given writer and returns it.
 VirtualMachine vm()
          Returns the virtual machine to which this Codeable object belongs.
 

Method Detail

toCode

public CodeWriter toCode(CodeWriter out)
Renders the codeable object to the given writer and returns it.

setComment

public void setComment(int type,
                       java.lang.String text)
Sets the comment to the given type and text.

getComment

public Comment getComment()
Gets the comment for this Codeable object.

vm

public VirtualMachine vm()
Returns the virtual machine to which this Codeable object belongs.