ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

org.jboss.shrinkwrap.impl.base
Class AssignableBase<T extends Archive<?>>

java.lang.Object
  extended by org.jboss.shrinkwrap.impl.base.AssignableBase<T>
All Implemented Interfaces:
Assignable
Direct Known Subclasses:
AbstractStreamExporterImpl, ConfigurableArchiveImpl, ContainerBase, ExplodedExporterImpl, ExplodedImporterImpl, TarGzImporterImpl, TarImporterImpl, 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: $
Author:
Aslak Knutsen

Constructor Summary
protected AssignableBase(T archive)
          Constructs a new instance using the underlying specified archive, which is required
 
Method Summary
<TYPE extends Assignable>
TYPE
as(Class<TYPE> clazz)
          Wraps an Archive in a different 'view'.
protected  T getArchive()
          Returns the underlying archive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssignableBase

protected AssignableBase(T archive)
Constructs a new instance using the underlying specified archive, which is required

Parameters:
archive -
Method Detail

as

public final <TYPE extends Assignable> TYPE as(Class<TYPE> clazz)
Wraps an Archive in a different 'view'.

Specified by:
as in interface Assignable
Parameters:
clazz - Extension interface to load
Returns:
The Archive wrapped as TYPE
See Also:
org.jboss.shrinkwrap.api.Specializer#as(java.lang.Class)

getArchive

protected final T getArchive()
Returns the underlying archive

Returns:

ShrinkWrap Aggregator and Build Parent 1.0.0-cr-1

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