Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.tapestry.enhance.javassist
Class CreateAutoParameterEnhancer  view CreateAutoParameterEnhancer download CreateAutoParameterEnhancer.java

java.lang.Object
  extended byorg.apache.tapestry.enhance.javassist.CreateAutoParameterEnhancer
All Implemented Interfaces:
org.apache.tapestry.enhance.IEnhancer

public class CreateAutoParameterEnhancer
extends java.lang.Object
implements org.apache.tapestry.enhance.IEnhancer

Creates a synthetic property for a Direction.AUTO>Direction.AUTO 55 parameter.

Since:
3.0
Version:
$Id: CreateAutoParameterEnhancer.java,v 1.5 2004/04/06 18:18:57 hlship Exp $

Field Summary
private  EnhancedClass _enhancedClass
           
private  java.lang.String _parameterName
           
private  java.lang.String _propertyName
           
private  java.lang.String _readMethodName
           
private  CtClass _type
           
private static org.apache.commons.logging.Log LOG
           
protected static java.lang.String PARAMETER_ACCESSOR_TEMPLATE
          The code template for the parameter accessor method.
protected static java.lang.String PARAMETER_MUTATOR_TEMPLATE
          The code template for the parameter mutator method.
private static java.util.Map SPECIAL_BINDING_TYPES
          The list of types that have accessors and mutators other than getObject()/setObject.
private static java.util.Map VALUE_CAST_TYPES
           
 
Constructor Summary
CreateAutoParameterEnhancer(EnhancedClass enhancedClass, java.lang.String propertyName, java.lang.String parameterName, CtClass type, java.lang.String readMethodName)
           
 
Method Summary
private  void createReadMethod(ClassFabricator cf, java.lang.String readBindingMethodName)
           
private  void createWriteMethod(ClassFabricator cf, java.lang.String readBindingMethodName)
           
private  java.lang.String getSpecialBindingType()
           
private  java.lang.String getValueCastType()
           
 void performEnhancement(org.apache.tapestry.enhance.IEnhancedClass enhancedClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.enhance.IEnhancer
performEnhancement
 

Field Detail

LOG

private static final org.apache.commons.logging.Log LOG

PARAMETER_ACCESSOR_TEMPLATE

protected static final java.lang.String PARAMETER_ACCESSOR_TEMPLATE
The code template for the parameter accessor method.

Legend:
{0} = readBindingMethodName
{1} = binding value accessor
{2} = cast (if needed)

See Also:
Constant Field Values

PARAMETER_MUTATOR_TEMPLATE

protected static final java.lang.String PARAMETER_MUTATOR_TEMPLATE
The code template for the parameter mutator method.

Legend:
{0} = readBindingMethodName
{1} = binding value mutator
{2} = value cast

See Also:
Constant Field Values

SPECIAL_BINDING_TYPES

private static final java.util.Map SPECIAL_BINDING_TYPES
The list of types that have accessors and mutators other than getObject()/setObject. The key in the Map is the type, the value is the property name in IBinding


VALUE_CAST_TYPES

private static final java.util.Map VALUE_CAST_TYPES

_enhancedClass

private EnhancedClass _enhancedClass

_propertyName

private java.lang.String _propertyName

_parameterName

private java.lang.String _parameterName

_type

private CtClass _type

_readMethodName

private java.lang.String _readMethodName
Constructor Detail

CreateAutoParameterEnhancer

public CreateAutoParameterEnhancer(EnhancedClass enhancedClass,
                                   java.lang.String propertyName,
                                   java.lang.String parameterName,
                                   CtClass type,
                                   java.lang.String readMethodName)
Method Detail

performEnhancement

public void performEnhancement(org.apache.tapestry.enhance.IEnhancedClass enhancedClass)

getSpecialBindingType

private java.lang.String getSpecialBindingType()

getValueCastType

private java.lang.String getValueCastType()

createReadMethod

private void createReadMethod(ClassFabricator cf,
                              java.lang.String readBindingMethodName)

createWriteMethod

private void createWriteMethod(ClassFabricator cf,
                               java.lang.String readBindingMethodName)