org.apache.tuscany.sdo.codegen
Class BytecodeInterfaceGenerator

java.lang.Object
  extended by org.apache.tuscany.sdo.codegen.BytecodeInterfaceGenerator
All Implemented Interfaces:
SDOTypeVisitor

public class BytecodeInterfaceGenerator
extends Object
implements SDOTypeVisitor

Implementation of a generator that will directly emit bytecode for an interface that corresponds to the static properties of a SDO type.


Constructor Summary
BytecodeInterfaceGenerator()
           
 
Method Summary
 byte[] getClassData()
          Return the bytecode for the interface class in a form that can be written to disk, added to a JAR file, or passed to a ClassLoader.
 void visitEnd()
          Visit after all properties.
 void visitProperty(Property property)
          Visit a property definition.
 void visitType(Type type)
          Visit a type definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytecodeInterfaceGenerator

public BytecodeInterfaceGenerator()
Method Detail

visitType

public void visitType(Type type)
Description copied from interface: SDOTypeVisitor
Visit a type definition.

Specified by:
visitType in interface SDOTypeVisitor
Parameters:
type - the type to visit

visitProperty

public void visitProperty(Property property)
Description copied from interface: SDOTypeVisitor
Visit a property definition.

Specified by:
visitProperty in interface SDOTypeVisitor
Parameters:
property - the property to visit

visitEnd

public void visitEnd()
Description copied from interface: SDOTypeVisitor
Visit after all properties.

Specified by:
visitEnd in interface SDOTypeVisitor

getClassData

public byte[] getClassData()
Return the bytecode for the interface class in a form that can be written to disk, added to a JAR file, or passed to a ClassLoader.

Returns:
the bytecode for the SDO Type's interface class


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.