| org.apache.tapestry.ioc.services.ClassFactory
All known Subclasses: org.apache.tapestry.ioc.internal.services.ClassFactoryImpl,
ClassFactory | public interface ClassFactory (Code) | | Service used when dynamically creating new classes.
|
getClassLoader | ClassLoader getClassLoader()(Code) | | Returns the class loader used when creating new classes; this is generally the same as the
current thread's context class loader (except perhaps during testing).
|
getConstructorLocation | Location getConstructorLocation(Constructor constructor)(Code) | | Return a string representation fo the constructor (including class and parameters) and (if
available) file name and line number.
|
getCreatedClassCount | int getCreatedClassCount()(Code) | | Returns the number of classes (and interfaces) actually created.
|
getMethodLocation | Location getMethodLocation(Method method)(Code) | | Converts a method to a
MethodLocation , which includes information about the source
file name and line number.
Parameters: method - to look up the location, or null if the necessary information is not available |
importClass | Class importClass(Class clazz)(Code) | | Imports the class to make it referenceable within the factory. The class loader for the class
is added to the class path. The class itself is returned, if its bytecode is available. If
not, a search up the inhertance occurs until a proper class (that can be referenced in
generated bytecode) is found. This is necessary to handle cases where a class is generated at
runtime, outside of the class factory, and bytecode is not available for it.
Parameters: clazz - a referencable super-class |
newClass | ClassFab newClass(Class serviceInterface)(Code) | | Simplified version of
ClassFactory.newClass(String,Class) that generates a name based on the
service interface name, extends from java.lang.Object, and automatically adds the
serviceInterface to the returned ClassFab. This is the most common use when creating the
kinds of proxies used throughout Tapestry IoC.
Parameters: serviceInterface - |
newClass | ClassFab newClass(String name, Class superClass)(Code) | | Creates a
ClassFab object for the given name; the new class is a subclass of the
indicated class. The new class is always public and concrete.
Parameters: name - the full qualified name of the class to create (note that it is common to placecreated classes in the default package) Parameters: superClass - the parent class, which is often java.lang.Object |
|
|