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
 TransformMethod addNewMethod(TransformMethodSignature signature, String methodBody)
          Adds a new method to the transformed class, possibly replacing an existing method or overriding a base-class method.
 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.
 String finish()
          Invoked after all ComponentClassTransformWorkers have had their chance to work over the class.
 List<Object> 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, addComponentEventHandler, addField, addImplementedInterface, addIndirectInjectedField, addInjectedField, addMethod, addTransformedMethod, advise, claimField, createField, extendConstructor, extendExistingMethod, extendMethod, findFields, findFieldsWithAnnotation, findMethods, findMethodsWithAnnotation, findUnclaimedFields, getClassName, getField, getFieldAnnotation, getFieldModifiers, getFieldType, getLogger, getMethodAnnotation, getMethodIdentifier, getOrCreateMethod, getResourcesFieldName, injectField, isDeclaredMethod, isField, isMethodOverride, isRootTransformation, makeReadOnly, matchFields, matchFieldsWithAnnotation, matchMethods, matchMethodsWithAnnotation, matchUnclaimedFields, newMemberName, newMemberName, prefixMethod, removeField, replaceReadAccess, replaceWriteAccess, toClass
 
Methods inherited from interface org.apache.tapestry5.ioc.AnnotationProvider
getAnnotation
 

Method Detail

addNewMethod

TransformMethod addNewMethod(TransformMethodSignature signature,
                             String methodBody)
Adds a new method to the transformed class, possibly replacing an existing method or overriding a base-class method.

Since:
5.2.0

finish

String 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.

Returns:
the description of the transformation, so that it can be logged (quite verbose)

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<Object> 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.


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-2011 Apache Software Foundation. All Rights Reserved.