mirror of https://github.com/apache/jclouds.git
missing unwrap class arg
This commit is contained in:
parent
9267ac29ba
commit
1d85435fe8
|
@ -51,7 +51,13 @@ public interface Wrapper {
|
||||||
* if the wrapped context is not assignable from the specified class.
|
* if the wrapped context is not assignable from the specified class.
|
||||||
* @see #getWrappedType()
|
* @see #getWrappedType()
|
||||||
*/
|
*/
|
||||||
<C extends Closeable> C unwrap(TypeToken<C> type);
|
<C extends Closeable> C unwrap(TypeToken<C> type) throws IllegalArgumentException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* shortcut for {@code unwrap(TypeToken.of(clazz))}
|
||||||
|
* @see #unwrap(TypeToken)
|
||||||
|
*/
|
||||||
|
<C extends Closeable> C unwrap(Class<C> clazz) throws IllegalArgumentException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* shortcut for {@code unwrap(getWrappedType())}
|
* shortcut for {@code unwrap(getWrappedType())}
|
||||||
|
|
|
@ -54,6 +54,11 @@ public abstract class BaseWrapper implements Wrapper {
|
||||||
return (C) wrapped;
|
return (C) wrapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <C extends Closeable> C unwrap(Class<C> clazz) {
|
||||||
|
return unwrap (TypeToken.of(checkNotNull(clazz, "clazz")));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TypeToken<? extends Closeable> getWrappedType() {
|
public TypeToken<? extends Closeable> getWrappedType() {
|
||||||
return wrappedType;
|
return wrappedType;
|
||||||
|
|
Loading…
Reference in New Issue