org.openrdf.elmo.dynacode
Class ClassTemplate

java.lang.Object
  extended by org.openrdf.elmo.dynacode.ClassTemplate

public class ClassTemplate
extends Object


Constructor Summary
protected ClassTemplate(javassist.CtClass cc, ClassFactory cp)
           
 
Method Summary
 void addConstructor(Class<?>[] types, String string)
           
 void addInterface(Class<?> face)
           
 CodeBuilder assignStaticField(Class<?> type, String fieldName)
           
 void createField(Class<?> type, String fieldName)
           
 CodeBuilder createMethod(Class<?> type, String name, Class<?>... parameters)
           
 CodeBuilder createTransientMethod(Class<?> type, String name, Class<?>... parameters)
           
 CodeBuilder getCodeBuilder()
           
 javassist.CtClass getCtClass()
           
 Set<String> getDeclaredFieldNames()
           
 Class<?>[] getInterfaces()
           
 CodeBuilder overrideMethod(Method method)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassTemplate

protected ClassTemplate(javassist.CtClass cc,
                        ClassFactory cp)
Method Detail

addConstructor

public void addConstructor(Class<?>[] types,
                           String string)
                    throws ElmoCompositionException
Throws:
ElmoCompositionException

addInterface

public void addInterface(Class<?> face)
                  throws ElmoCompositionException
Throws:
ElmoCompositionException

assignStaticField

public CodeBuilder assignStaticField(Class<?> type,
                                     String fieldName)
                              throws ElmoCompositionException
Throws:
ElmoCompositionException

createField

public void createField(Class<?> type,
                        String fieldName)
                 throws ElmoCompositionException
Throws:
ElmoCompositionException

createMethod

public CodeBuilder createMethod(Class<?> type,
                                String name,
                                Class<?>... parameters)
                         throws ElmoCompositionException
Throws:
ElmoCompositionException

createTransientMethod

public CodeBuilder createTransientMethod(Class<?> type,
                                         String name,
                                         Class<?>... parameters)
                                  throws ElmoCompositionException
Throws:
ElmoCompositionException

getCodeBuilder

public CodeBuilder getCodeBuilder()

getCtClass

public javassist.CtClass getCtClass()

getDeclaredFieldNames

public Set<String> getDeclaredFieldNames()

getInterfaces

public Class<?>[] getInterfaces()
                         throws ElmoCompositionException
Throws:
ElmoCompositionException

overrideMethod

public CodeBuilder overrideMethod(Method method)
                           throws ElmoCompositionException
Throws:
ElmoCompositionException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2004-2008 Aduna. All Rights Reserved.