org.apache.tapestry5.internal.services
Interface InternalClassTransformation

All Superinterfaces:
AnnotationProvider, ClassTransformation
All Known Implementing Classes:
InternalClassTransformationImpl

public interface InternalClassTransformation
extends ClassTransformation

Extends ClassTransformation with additional methods that may only be used internally by Tapestry.


Method Summary
 void copyMethod(TransformMethodSignature sourceMethod, int modifiers, String newMethodName)
          Creates a new method by copying the body of an existing method.
 InternalClassTransformation createChildTransformation(javassist.CtClass childClass, MutableComponentModel childModel)
           
 Instantiator createInstantiator()
          Called (after finish()) to construct an instantiator for the component.
 void finish()
          Invoked after all ComponentClassTransformWorkers have had their chance to work over the class.
 List<ConstructorArg> getConstructorArgs()
          Returns a copy of the list of constructor arguments for this class.
 IdAllocator getIdAllocator()
          Returns a copy of the transformation's IdAllocator.
 InternalClassTransformation getParentTransformation()
          Returns the parent transformation, or null for a root class.
 boolean isMethod(TransformMethodSignature signature)
          Returns true if the provided signature is a method implemented by the transformed class.
 String searchForPreviousInjection(InjectionKey key)
          Searchs for an existing injection of an object, returning the name of the protected field into which the value was injected.
 
Methods inherited from interface org.apache.tapestry5.services.ClassTransformation
addCatch, addField, addImplementedInterface, addInjectedField, addMethod, addTransformedMethod, advise, claimField, extendConstructor, extendExistingMethod, extendMethod, findFields, findFieldsWithAnnotation, findMethods, findMethodsWithAnnotation, findUnclaimedFields, getClassName, getFieldAnnotation, getFieldModifiers, getFieldType, getLogger, getMethodAnnotation, getMethodIdentifier, getResourcesFieldName, injectField, isField, isMethodOverride, isRootTransformation, makeReadOnly, newMemberName, newMemberName, prefixMethod, removeField, replaceReadAccess, replaceWriteAccess, toClass
 
Methods inherited from interface org.apache.tapestry5.ioc.AnnotationProvider
getAnnotation
 

Method Detail

finish

void finish()
Invoked after all ComponentClassTransformWorkers have had their chance to work over the class. This performs any final operations for the class transformation, which includes coming up with the final constructor method for the class.


createInstantiator

Instantiator createInstantiator()
Called (after finish()) to construct an instantiator for the component.

Returns:
the component's instantiator

getIdAllocator

IdAllocator getIdAllocator()
Returns a copy of the transformation's IdAllocator. Used when creating a child class transformation. May only be invoked on a frozen transformation.


getConstructorArgs

List<ConstructorArg> getConstructorArgs()
Returns a copy of the list of constructor arguments for this class.


searchForPreviousInjection

String searchForPreviousInjection(InjectionKey key)
Searchs for an existing injection of an object, returning the name of the protected field into which the value was injected.

TODO: Howard sayz: Uggh! At least define a real key (MultiKey is intended for internal use, never part of an API). Is this necessary? The cost of re-injection is tiny.


createChildTransformation

InternalClassTransformation createChildTransformation(javassist.CtClass childClass,
                                                      MutableComponentModel childModel)

getParentTransformation

InternalClassTransformation getParentTransformation()
Returns the parent transformation, or null for a root class.


copyMethod

void copyMethod(TransformMethodSignature sourceMethod,
                int modifiers,
                String newMethodName)
Creates a new method by copying the body of an existing method. This is part of the scheme for providing method advice.

Parameters:
sourceMethod - method to be copied
modifiers - modifiers for the new method
newMethodName - name of new method to create

isMethod

boolean isMethod(TransformMethodSignature signature)
Returns true if the provided signature is a method implemented by the transformed class.

Parameters:
signature -
Returns:
true if implemented


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.