org.apache.tapestry5.ioc.internal.services
Class CtClassSourceImpl

java.lang.Object
  extended by org.apache.tapestry5.ioc.internal.services.CtClassSourceImpl
All Implemented Interfaces:
CtClassSource

public class CtClassSourceImpl
extends Object
implements CtClassSource

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


Constructor Summary
CtClassSourceImpl(ClassFactoryClassPool pool, ClassLoader loader)
           
 
Method Summary
 Class createClass(javassist.CtClass ctClass)
          Used after constructing the CtClass fully, to convert it into a Class ready to be instantiated.
 int getCreatedClassCount()
          Returns the number of classes (and interfaces) created by this source.
 javassist.CtClass newClass(String name, Class superClass)
          Createa a new CtClass instance.
 javassist.CtClass toCtClass(Class searchClass)
          Converts an existing class to a CtClass instance.
 javassist.CtClass toCtClass(String name)
          Converts a class name to a CtClass instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CtClassSourceImpl

public CtClassSourceImpl(ClassFactoryClassPool pool,
                         ClassLoader loader)
Method Detail

getCreatedClassCount

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

Specified by:
getCreatedClassCount in interface CtClassSource

toCtClass

public javassist.CtClass toCtClass(Class searchClass)
Description copied from interface: CtClassSource
Converts an existing class to a CtClass instance.

Specified by:
toCtClass in interface CtClassSource

toCtClass

public javassist.CtClass toCtClass(String name)
Description copied from interface: CtClassSource
Converts a class name to a CtClass instance.

Specified by:
toCtClass in interface CtClassSource

newClass

public javassist.CtClass newClass(String name,
                                  Class superClass)
Description copied from interface: CtClassSource
Createa a new CtClass instance.

Specified by:
newClass in interface CtClassSource

createClass

public Class createClass(javassist.CtClass ctClass)
Description copied from interface: CtClassSource
Used after constructing the CtClass fully, to convert it into a Class ready to be instantiated.

Specified by:
createClass in interface CtClassSource


Copyright © 2003-2012 The Apache Software Foundation.