org.ops4j.peaberry.util
Class TypeLiterals

java.lang.Object
  extended by org.ops4j.peaberry.util.TypeLiterals

public final class TypeLiterals
extends Object

Methods for creating TypeLiterals that can be used with peaberry.

Author:
mcculls@gmail.com (Stuart McCulloch)

Method Summary
static
<T> com.google.inject.TypeLiteral<Export<? extends T>>
export(Class<T> clazz)
          Create TypeLiteral matching an exported handle of the given type.
static
<T> com.google.inject.TypeLiteral<Iterable<? extends T>>
iterable(Class<T> clazz)
          Create TypeLiteral matching an iterable sequence of the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

iterable

public static <T> com.google.inject.TypeLiteral<Iterable<? extends T>> iterable(Class<T> clazz)
Create TypeLiteral matching an iterable sequence of the given type.

Parameters:
clazz - service interface
Returns:
literal type matching Iterable<? extends T>

export

public static <T> com.google.inject.TypeLiteral<Export<? extends T>> export(Class<T> clazz)
Create TypeLiteral matching an exported handle of the given type.

Parameters:
clazz - service interface
Returns:
literal type matching Export<? extends T>


Copyright © 2006-2012 OPS4J - Open Participation Software for Java. All Rights Reserved.