org.jboss.classadapter.spi
Interface ClassAdapter

All Superinterfaces:
Cloneable, org.jboss.util.JBossInterface
All Known Implementing Classes:
ReflectClassAdapter

public interface ClassAdapter
extends org.jboss.util.JBossInterface

A class adapter.

A class adapter is the integration point for manipulating class information at runtime, e.g. overriding annotations or obtaining an aop instance advisor.

The class adapter has the following protocol.

  1. Use getClassInfo to obtain information about the class.
  2. Obtain an Instance ClassAdapter if the class information should be overridden at the instance level, e.g. annotations
  3. Obtain the dependencies of the Class/Instance and any advice factories, e.g. @Depends annotations
  4. Obtain the JoinpointFactory so the instance can be constructed.
FIXME: This class deals with too many concerns FIXME: Need a mechanism to allow different use cases for the unadvised case. i.e. whether in the absence of aop requirements the adapter should give a proxy advisor, instrument the class for aop anyway or default back to reflection (most likely!)

Author:
Adrian Brock

Method Summary
 ClassInfo getClassInfo()
          Get the class info.
 List getDependencies(Map metadata)
          Deprecated.  
 ClassAdapter getInstanceAdapter(ClassInfo classInfo)
          Get an instance adapter.
 JoinpointFactory getJoinpointFactory()
          Get the Joinpoint Factory for this adapter.
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Method Detail

getClassInfo

public ClassInfo getClassInfo()
Get the class info.

Returns:
the class info

getInstanceAdapter

public ClassAdapter getInstanceAdapter(ClassInfo classInfo)
Get an instance adapter.

Parameters:
classInfo - the changed class info
Returns:
instance adapter

getDependencies

public List getDependencies(Map metadata)
Deprecated.  

Get the dependencies of this adapter

Parameters:
metadata - TODO what is this rubbish???
Returns:
the list of dependencies

getJoinpointFactory

public JoinpointFactory getJoinpointFactory()
Get the Joinpoint Factory for this adapter.

Returns:
the joinpoint factory


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.