org.apache.tapestry5.internal.services.InternalClassTransformation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tapestry-core Show documentation
Show all versions of tapestry-core Show documentation
Central module for Tapestry, containing interfaces to the Java
Servlet API and all core services and components.
// Copyright 2006, 2007, 2008, 2010 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package org.apache.tapestry5.internal.services;
import javassist.CtClass;
import org.apache.tapestry5.ioc.util.IdAllocator;
import org.apache.tapestry5.model.MutableComponentModel;
import org.apache.tapestry5.services.ClassTransformation;
import org.apache.tapestry5.services.ComponentClassTransformWorker;
import org.apache.tapestry5.services.TransformMethod;
import org.apache.tapestry5.services.TransformMethodSignature;
import java.util.List;
/**
* Extends {@link org.apache.tapestry5.services.ClassTransformation} with additional methods that may only be used
* internally by Tapestry.
*/
public interface InternalClassTransformation extends ClassTransformation
{
/**
* Adds a new method to the transformed class, possibly replacing an existing method or
* overriding a base-class method.
*
* @since 5.2.0
*/
TransformMethod addNewMethod(TransformMethodSignature signature, String methodBody);
/**
* Invoked after all {@link ComponentClassTransformWorker}s 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.
*
* @return the description of the transformation, so that it can be logged (quite verbose)
*/
String finish();
/**
* Called (after {@link #finish()}) to construct an instantiator for the component.
*
* @return the component's instantiator
*/
Instantiator createInstantiator();
/**
* Returns a copy of the transformation's IdAllocator. Used when creating a child class transformation. May only be
* invoked on a frozen transformation.
*/
IdAllocator getIdAllocator();
/**
* Returns a copy of the list of constructor arguments for this class.
*/
List