org.apache.tapestry5.services
Class AliasContribution<T>

java.lang.Object
  extended by org.apache.tapestry5.services.AliasContribution<T>

public final class AliasContribution<T>
extends Object

A contribution into the Alias or AliasOverride service configuration.


Constructor Summary
AliasContribution(Class<T> contributionType, String mode, T object)
           
AliasContribution(Class<T> contributionType, T object)
          Conntributes the object with a blank mode.
 
Method Summary
static
<X> AliasContribution<X>
create(Class<X> contributionType, String mode, X object)
          Simplifies the creation of an AliasContribution around a known type, mode, and an instance of that type.
static
<X> AliasContribution<X>
create(Class<X> contributionType, X object)
          Simplifies the creation of an AliasContribution around a known type and instance of that type.
 Class<T> getContributionType()
           
 String getMode()
          Returns the mode of operation for this instance of Tapestry.
 T getObject()
          The contributed object, which will be made available.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AliasContribution

public AliasContribution(Class<T> contributionType,
                         T object)
Conntributes the object with a blank mode.


AliasContribution

public AliasContribution(Class<T> contributionType,
                         String mode,
                         T object)
Method Detail

create

public static <X> AliasContribution<X> create(Class<X> contributionType,
                                              X object)
Simplifies the creation of an AliasContribution around a known type and instance of that type.


create

public static <X> AliasContribution<X> create(Class<X> contributionType,
                                              String mode,
                                              X object)
Simplifies the creation of an AliasContribution around a known type, mode, and an instance of that type.


getMode

public String getMode()
Returns the mode of operation for this instance of Tapestry. Most of the time, this will be the empty string, meaning that the contribution applies to Tapestry is any mode. In other cases, the mode will be "servlet" but may be other modes via add on modules, such as "portlet" or "offline".


getContributionType

public Class<T> getContributionType()

getObject

public T getObject()
The contributed object, which will be made available.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.