public abstract class BaseView extends com.google.common.collect.ForwardingObject implements View
| Modifier | Constructor and Description |
|---|---|
protected |
BaseView(Context backend,
com.google.common.reflect.TypeToken<? extends Context> backendType) |
| Modifier and Type | Method and Description |
|---|---|
protected Context |
delegate() |
boolean |
equals(Object o) |
com.google.common.reflect.TypeToken<? extends Context> |
getBackendType() |
int |
hashCode() |
protected com.google.common.base.Objects.ToStringHelper |
string() |
String |
toString() |
<C extends Context> |
unwrap()
shortcut for
unwrap(getWrappedType()) |
<C extends Context> |
unwrap(com.google.common.reflect.TypeToken<C> type)
Return an object of the specified type to allow access to the backend
context.
|
<A extends Closeable> |
unwrapApi(Class<A> apiClass)
Unwraps the underlying api from this view.
|
public <C extends Context> C unwrap(com.google.common.reflect.TypeToken<C> type)
ViewIllegalArgumentException is thrown.
ex.
ApiContextbackendApi = computeContext.unwrap(new TypeToken >(){});
unwrap in interface Viewtype - the type of the context to be returned. The backend context must
be assignable from this type.View.getBackendType()public com.google.common.reflect.TypeToken<? extends Context> getBackendType()
getBackendType in interface Viewpublic <C extends Context> C unwrap() throws ClassCastException
Viewunwrap(getWrappedType())unwrap in interface ViewClassCastException - if the user supplied C param is not assignableFrom
View.getBackendType()public <A extends Closeable> A unwrapApi(Class<A> apiClass)
Viewprotected Context delegate()
delegate in class com.google.common.collect.ForwardingObjectpublic String toString()
toString in class com.google.common.collect.ForwardingObjectprotected com.google.common.base.Objects.ToStringHelper string()
Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.