org.jboss.kernel.plugins.annotations
Class ExternalInstallationAnnotationPlugin<C extends Annotation>

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.kernel.plugins.annotations.BaseMetaDataAnnotationPlugin<T,C>
          extended by org.jboss.kernel.plugins.annotations.AbstractAnnotationPlugin<org.jboss.reflect.spi.ClassInfo,C>
              extended by org.jboss.kernel.plugins.annotations.ClassAnnotationPlugin<C>
                  extended by org.jboss.kernel.plugins.annotations.ExternalInstallationAnnotationPlugin<C>
Type Parameters:
C - annotation type
All Implemented Interfaces:
Cloneable, AnnotationPlugin<org.jboss.reflect.spi.ClassInfo,C>, MetaDataAnnotationPlugin<org.jboss.reflect.spi.ClassInfo,C>, org.jboss.util.JBossInterface
Direct Known Subclasses:
ExternalInstallAnnotationPlugin, ExternalUninstallAnnotationPlugin

public abstract class ExternalInstallationAnnotationPlugin<C extends Annotation>
extends ClassAnnotationPlugin<C>

Abstract external installation annotation plugin.

Author:
Ales Justin

Field Summary
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
protected ExternalInstallationAnnotationPlugin(Class<C> annotation)
           
 
Method Summary
protected  InstallMetaData createInstallMetaData(ExternalInstall install)
          Create InstallMetaData from ExternalInstall.
protected abstract  List<InstallMetaData> getExistingInstallMetaData(BeanMetaData beanMetaData)
          Get existing InstallMetaData list.
protected abstract  ExternalInstall[] getExternalInstalls(C annotation)
          Get ExternalInstall array from annotation.
protected  List<InstallMetaData> getInstallMetaData(C annotation)
          Create InstallMetaData from array of ExternalInstall.
protected  List<? extends MetaDataVisitorNode> internalApplyAnnotation(org.jboss.reflect.spi.ClassInfo info, C annotation, BeanMetaData beanMetaData)
          Covariant override.
protected static boolean isDifferent(InstallMetaData first, InstallMetaData second)
          Compare twi InstallMetaData instances.
 
Methods inherited from class org.jboss.kernel.plugins.annotations.ClassAnnotationPlugin
isElementTypeSupported
 
Methods inherited from class org.jboss.kernel.plugins.annotations.AbstractAnnotationPlugin
applyAnnotation, checkIfNotAbstractBeanMetaDataSpecific, cleanAnnotation, internalApplyAnnotation, internalApplyAnnotation, internalCleanAnnotation, isMetaDataAlreadyPresent
 
Methods inherited from class org.jboss.kernel.plugins.annotations.BaseMetaDataAnnotationPlugin
applyAnnotation, getAnnotation, getSupportedTypes, isAttributePresent, isAttributePresent, isCleanup, isCleanupOnly, isMetaDataAlreadyPresent, toShortString, toString
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.kernel.plugins.annotations.MetaDataAnnotationPlugin
applyAnnotation, getAnnotation, getSupportedTypes
 

Constructor Detail

ExternalInstallationAnnotationPlugin

protected ExternalInstallationAnnotationPlugin(Class<C> annotation)
Method Detail

getExistingInstallMetaData

protected abstract List<InstallMetaData> getExistingInstallMetaData(BeanMetaData beanMetaData)
Get existing InstallMetaData list.

Parameters:
beanMetaData - the bean metadata
Returns:
list of existing InstallMetaData

getExternalInstalls

protected abstract ExternalInstall[] getExternalInstalls(C annotation)
Get ExternalInstall array from annotation.

Parameters:
annotation - the annotation
Returns:
array of ExternalInstall

getInstallMetaData

protected List<InstallMetaData> getInstallMetaData(C annotation)
Create InstallMetaData from array of ExternalInstall.

Parameters:
annotation - the annotation
Returns:
list of InstallMetaData

createInstallMetaData

protected InstallMetaData createInstallMetaData(ExternalInstall install)
Create InstallMetaData from ExternalInstall.

Parameters:
install - the existing install
Returns:
new InstallMetaData instance

internalApplyAnnotation

protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(org.jboss.reflect.spi.ClassInfo info,
                                                                      C annotation,
                                                                      BeanMetaData beanMetaData)
                                                               throws Throwable
Description copied from class: AbstractAnnotationPlugin
Covariant override.

Overrides:
internalApplyAnnotation in class AbstractAnnotationPlugin<org.jboss.reflect.spi.ClassInfo,C extends Annotation>
Parameters:
info - the info
annotation - the annotation
beanMetaData - the bean meta data
Returns:
used to return covariant type
Throws:
Throwable - for any error

isDifferent

protected static boolean isDifferent(InstallMetaData first,
                                     InstallMetaData second)
Compare twi InstallMetaData instances.

Parameters:
first - first InstallMetaData instance
second - second InstallMetaData instance
Returns:
true if instances differ


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