Class AssignableBase<T extends Archive<?>>

java.lang.Object
org.jboss.shrinkwrap.impl.base.AssignableBase<T>
All Implemented Interfaces:
Assignable
Direct Known Subclasses:
AbstractStreamExporterImpl, ConfigurableArchiveImpl, ContainerBase, ExplodedExporterImpl, ExplodedImporterImpl, IdentifiableArchiveImpl, TarImporterBase, ZipImporterImpl

public abstract class AssignableBase<T extends Archive<?>> extends Object implements Assignable
A generic implementation of Assignable that delegates down to the Archive extensions inner archive. Used by Archive extensions to simplify handling the generic extension mechanism.
Version:
$Revision: $
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final T
    Underlying archive
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AssignableBase(T archive)
    Constructs a new instance using the underlying specified archive, which is required
  • Method Summary

    Modifier and Type
    Method
    Description
    final <TYPE extends Assignable>
    TYPE
    as(Class<TYPE> clazz)
    Wraps an Archive in a different 'view'.
    protected final T
    Returns the underlying archive

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • archive

      private final T extends Archive<?> archive
      Underlying archive
  • Constructor Details

    • AssignableBase

      protected AssignableBase(T archive)
      Constructs a new instance using the underlying specified archive, which is required
      Parameters:
      archive -
  • Method Details

    • as

      public final <TYPE extends Assignable> TYPE as(Class<TYPE> clazz)
      Wraps an Archive in a different 'view'.
      Specified by:
      as in interface Assignable
      Type Parameters:
      TYPE -
      Parameters:
      clazz - Extension interface to load
      Returns:
      The Archive wrapped as TYPE
      See Also:
      • invalid reference
        org.jboss.shrinkwrap.api.Specializer#as(java.lang.Class)
    • getArchive

      protected final T getArchive()
      Returns the underlying archive
      Returns: