org.jboss.deployers.vfs.plugins.annotations
Class AnnotationEnvironmentDeployer

java.lang.Object
  extended by org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
      extended by org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer
          extended by org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer<T>
              extended by org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer<org.jboss.classloading.spi.dependency.Module>
                  extended by org.jboss.deployers.vfs.plugins.annotations.AnnotationEnvironmentDeployer
All Implemented Interfaces:
Deployer, Ordered
Direct Known Subclasses:
ScopedAnnotationEnvironmentDeployer

public class AnnotationEnvironmentDeployer
extends AbstractOptionalVFSRealDeployer<org.jboss.classloading.spi.dependency.Module>

A POST_CLASSLOADER deployer which creates AnnotationEnvironment for sub-deployments.

Author:
Ales Justin

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered
Ordered.OrderedComparator
 
Field Summary
 
Fields inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
log
 
Fields inherited from interface org.jboss.deployers.spi.Ordered
COMPARATOR
 
Constructor Summary
AnnotationEnvironmentDeployer()
           
 
Method Summary
protected  javassist.ClassPool createClassPool(ClassLoader classLoader)
          Deprecated. 
protected  javassist.ClassPool createClassPool(VFSDeploymentUnit unit)
          Create class pool.
protected  GenericAnnotationResourceVisitor createGenericAnnotationResourceVisitor(DeploymentUnit unit, javassist.ClassPool pool, ClassLoader classLoader)
          Create GenericAnnotationResourceVisitor.
 void deploy(VFSDeploymentUnit unit, org.jboss.classloading.spi.dependency.Module module)
          Deploy a deployment
protected  URL[] getUrls(VFSDeploymentUnit unit)
          Get the matching urls.
 void setCheckInterfaces(boolean checkInterfaces)
          Should we check interfaces for annotations as well.
 void setFilter(VFSDeploymentUnitFilter filter)
          Set vfs deployment filter.
 void setForceAnnotations(boolean forceAnnotations)
          Should we force all annotations to be available.
 void setKeepAnnotations(boolean keepAnnotations)
          Set the keep annotations flag.
protected  void visitModule(VFSDeploymentUnit unit, org.jboss.classloading.spi.dependency.Module module, GenericAnnotationResourceVisitor visitor)
          Visit module.
 
Methods inherited from class org.jboss.deployers.vfs.spi.deployer.AbstractOptionalVFSRealDeployer
deploy, undeploy, undeploy
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer
internalDeploy, internalUndeploy, setDisableOptional
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer
addControllerContextName, deploy, isControllerContextNameCandidate, isUseUnitName, removeControllerContextName, setUseUnitName, undeploy
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
addInput, addInput, addOutput, addOutput, getInput, getInputs, getOutput, getOutputs, getRelativeOrder, getStage, isAllInputs, isComponentsOnly, isParentFirst, isTopLevelOnly, isWantComponents, setAllInputs, setComponentsOnly, setInput, setInputs, setInputs, setInputs, setOutput, setOutputs, setOutputs, setOutputs, setParentFirst, setRelativeOrder, setStage, setTopLevelOnly, setWantComponents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationEnvironmentDeployer

public AnnotationEnvironmentDeployer()
Method Detail

setForceAnnotations

public void setForceAnnotations(boolean forceAnnotations)
Should we force all annotations to be available.

Parameters:
forceAnnotations - the force annotations flag

setKeepAnnotations

public void setKeepAnnotations(boolean keepAnnotations)
Set the keep annotations flag.

Parameters:
keepAnnotations - the keep annotations flag

setCheckInterfaces

public void setCheckInterfaces(boolean checkInterfaces)
Should we check interfaces for annotations as well.

Parameters:
checkInterfaces - the check interfaces flag

setFilter

public void setFilter(VFSDeploymentUnitFilter filter)
Set vfs deployment filter.

Parameters:
filter - the vfs deployment filter.

createGenericAnnotationResourceVisitor

protected GenericAnnotationResourceVisitor createGenericAnnotationResourceVisitor(DeploymentUnit unit,
                                                                                  javassist.ClassPool pool,
                                                                                  ClassLoader classLoader)
Create GenericAnnotationResourceVisitor. Can be used change existing GARV's filter. Or determin if we need to force/keep annotations.

Parameters:
unit - the deployment unit
pool - the class pool
classLoader - the classloader
Returns:
new generic annotation visitor

createClassPool

@Deprecated
protected javassist.ClassPool createClassPool(ClassLoader classLoader)
Deprecated. 

Create class pool.

Parameters:
classLoader - the class loader
Returns:
javassist class pool

createClassPool

protected javassist.ClassPool createClassPool(VFSDeploymentUnit unit)
Create class pool.

Parameters:
unit - the deployment unit
Returns:
javassist class pool

visitModule

protected void visitModule(VFSDeploymentUnit unit,
                           org.jboss.classloading.spi.dependency.Module module,
                           GenericAnnotationResourceVisitor visitor)
                    throws DeploymentException
Visit module. Util method to add some behavior to Module before we visit it.

Parameters:
unit - the deployment unit
module - the module
visitor - the resource visitor
Throws:
DeploymentException - for any error

getUrls

protected URL[] getUrls(VFSDeploymentUnit unit)
                 throws Exception
Get the matching urls.

Parameters:
unit - the deployment unit
Returns:
matching urls
Throws:
Exception - for any error

deploy

public void deploy(VFSDeploymentUnit unit,
                   org.jboss.classloading.spi.dependency.Module module)
            throws DeploymentException
Description copied from class: AbstractOptionalVFSRealDeployer
Deploy a deployment

Specified by:
deploy in class AbstractOptionalVFSRealDeployer<org.jboss.classloading.spi.dependency.Module>
Parameters:
unit - the unit
module - the attachment
Throws:
DeploymentException - for any error


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.