From 66dc8787ae935c0ab2de96ac84ae9867b2dfee68 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Thu, 19 Apr 2012 11:55:56 -0700 Subject: [PATCH] added javadoc --- core/src/main/java/org/jclouds/Wrapper.java | 25 +++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/jclouds/Wrapper.java b/core/src/main/java/org/jclouds/Wrapper.java index d80839f894..085cc9ab9a 100644 --- a/core/src/main/java/org/jclouds/Wrapper.java +++ b/core/src/main/java/org/jclouds/Wrapper.java @@ -24,7 +24,12 @@ import com.google.common.annotations.Beta; import com.google.common.reflect.TypeToken; /** - * + * {@link Wrapper} allows access to the provider-specific, or library-driven api + * behind an abstraction. One wrapped context can support multiple wrappers. + *

+ * For example, the {@code CloudStackContext} can be wrapped by both + * {@code ComputeServiceContext} and {@code LoadBalancerServiceContext}, as the + * api covers these features. * * @author Adrian Cole * @@ -39,26 +44,28 @@ public interface Wrapper { TypeToken getWrappedType(); /** - * Return an object of the specified type to allow access to the wrapped context. If the wrapped - * context is not assignable from the supplied type, an {@link IllegalArgumentException} is - * thrown. + * Return an object of the specified type to allow access to the wrapped + * context. If the wrapped context is not assignable from the supplied type, + * an {@link IllegalArgumentException} is thrown. * * @param type - * the type of the context to be returned. The wrapped context must be assignable from - * this type. + * the type of the context to be returned. The wrapped context must + * be assignable from this type. * @return an instance of the specified type * @throws IllegalArgumentException - * if the wrapped context is not assignable from the specified class. + * if the wrapped context is not assignable from the specified + * class. * @see #getWrappedType() */ C unwrap(TypeToken type) throws IllegalArgumentException; - + /** * shortcut for {@code unwrap(TypeToken.of(clazz))} + * * @see #unwrap(TypeToken) */ C unwrap(Class clazz) throws IllegalArgumentException; - + /** * shortcut for {@code unwrap(getWrappedType())} *