com.caucho.config.gen
Class AbstractAspectFactory<X>

java.lang.Object
  extended by com.caucho.config.gen.AbstractAspectFactory<X>
All Implemented Interfaces:
AspectFactory<X>
Direct Known Subclasses:
AsynchronousFactory, CacheFactory, InterceptorFactory, LockFactory, MethodHeadFactory, SecurityFactory, XaFactory

@Module
public abstract class AbstractAspectFactory<X>
extends java.lang.Object
implements AspectFactory<X>

Represents a filter for invoking a method


Constructor Summary
protected AbstractAspectFactory(AspectBeanFactory<X> beanFactory, AspectFactory<X> next)
           
 
Method Summary
 AspectGenerator<X> create(AnnotatedMethod<? super X> method, boolean isEnhanced)
          Returns an aspect for the method if one exists.
 void generateEpilogue(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
           
 void generateInject(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
           
 void generatePostConstruct(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
           
 void generatePreDestroy(JavaWriter out, java.util.HashMap<java.lang.String,java.lang.Object> map)
           
 AspectBeanFactory<X> getAspectBeanFactory()
          Returns the bean Factory.
 AnnotatedType<X> getBeanType()
          Returns the factory's bean type.
 java.lang.String getGeneratedClassName()
          Returns the generated class name
 java.lang.String getInstanceClassName()
          Returns the generated class name
 java.lang.Class<?> getJavaClass()
          Returns the Java class of the bean.
 boolean isEnhanced()
          Returns true if the factory requires enhancement
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractAspectFactory

protected AbstractAspectFactory(AspectBeanFactory<X> beanFactory,
                                AspectFactory<X> next)
Method Detail

getAspectBeanFactory

public AspectBeanFactory<X> getAspectBeanFactory()
Returns the bean Factory.

Specified by:
getAspectBeanFactory in interface AspectFactory<X>

getGeneratedClassName

public java.lang.String getGeneratedClassName()
Returns the generated class name


getInstanceClassName

public java.lang.String getInstanceClassName()
Returns the generated class name


getBeanType

public AnnotatedType<X> getBeanType()
Returns the factory's bean type.

Specified by:
getBeanType in interface AspectFactory<X>

getJavaClass

public java.lang.Class<?> getJavaClass()
Returns the Java class of the bean.


isEnhanced

public boolean isEnhanced()
Returns true if the factory requires enhancement

Specified by:
isEnhanced in interface AspectFactory<X>

create

public AspectGenerator<X> create(AnnotatedMethod<? super X> method,
                                 boolean isEnhanced)
Returns an aspect for the method if one exists.

Specified by:
create in interface AspectFactory<X>

generateInject

public void generateInject(JavaWriter out,
                           java.util.HashMap<java.lang.String,java.lang.Object> map)
                    throws java.io.IOException
Specified by:
generateInject in interface AspectFactory<X>
Throws:
java.io.IOException

generatePostConstruct

public void generatePostConstruct(JavaWriter out,
                                  java.util.HashMap<java.lang.String,java.lang.Object> map)
                           throws java.io.IOException
Specified by:
generatePostConstruct in interface AspectFactory<X>
Throws:
java.io.IOException

generatePreDestroy

public void generatePreDestroy(JavaWriter out,
                               java.util.HashMap<java.lang.String,java.lang.Object> map)
                        throws java.io.IOException
Specified by:
generatePreDestroy in interface AspectFactory<X>
Throws:
java.io.IOException

generateEpilogue

public void generateEpilogue(JavaWriter out,
                             java.util.HashMap<java.lang.String,java.lang.Object> map)
                      throws java.io.IOException
Specified by:
generateEpilogue in interface AspectFactory<X>
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object