org.apache.hivemind.service.impl
Class CtClassSource

java.lang.Object
  extended by org.apache.hivemind.service.impl.CtClassSource

public class CtClassSource
extends java.lang.Object

Wrapper around Javassist's ClassPool and our own ClassFactoryClassLoader that manages the creation of new instance of CtClass and converts finished CtClass's into instantiable Classes.

Author:
Howard Lewis Ship

Constructor Summary
CtClassSource(HiveMindClassPool pool)
           
 
Method Summary
 boolean canConvert(java.lang.Class searchClass)
           
 java.lang.Class createClass(javassist.CtClass ctClass)
           
 int getCreatedClassCount()
          Returns the number of classes (and interfaces) created by this source.
 javassist.CtClass getCtClass(java.lang.Class searchClass)
           
 javassist.CtClass newClass(java.lang.String name, java.lang.Class superClass)
           
 javassist.CtClass newInterface(java.lang.String name)
          Creates a new, empty interace, with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CtClassSource

public CtClassSource(HiveMindClassPool pool)
Method Detail

getCreatedClassCount

public int getCreatedClassCount()
Returns the number of classes (and interfaces) created by this source.

Returns:
the count
Since:
1.2
See Also:
createClass(CtClass)

canConvert

public boolean canConvert(java.lang.Class searchClass)

getCtClass

public javassist.CtClass getCtClass(java.lang.Class searchClass)

newClass

public javassist.CtClass newClass(java.lang.String name,
                                  java.lang.Class superClass)

newInterface

public javassist.CtClass newInterface(java.lang.String name)
Creates a new, empty interace, with the given name.

Since:
1.1

createClass

public java.lang.Class createClass(javassist.CtClass ctClass)


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.