T
- the type of interface that will be wrapped.public interface AutoBean<T>
AutoBeanFactory
.Modifier and Type | Interface and Description |
---|---|
static interface |
AutoBean.PropertyName
An annotation that allows inferred property names to be overridden.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(AutoBeanVisitor visitor)
Accept an AutoBeanVisitor.
|
T |
as()
Returns a proxy implementation of the
T interface which will
delegate to the underlying wrapped object, if any. |
AutoBean<T> |
clone(boolean deep)
Deprecated.
with no replacement
|
AutoBeanFactory |
getFactory()
Returns the AutoBeanFactory that created the AutoBean.
|
<Q> Q |
getTag(java.lang.String tagName)
Retrieve a tag value that was previously provided to
setTag(String, Object) . |
java.lang.Class<T> |
getType()
Returns the wrapped interface type.
|
boolean |
isFrozen()
Returns the value most recently passed to
setFrozen(boolean) , or
false if it has never been called. |
boolean |
isWrapper()
Returns
true if the AutoBean was provided with an external object. |
void |
setFrozen(boolean frozen)
Disallows any method calls other than getters.
|
void |
setTag(java.lang.String tagName,
java.lang.Object value)
A tag is an arbitrary piece of external metadata to be associated with the
wrapped value.
|
T |
unwrap()
If the AutoBean wraps an object, return the underlying object.
|
void accept(AutoBeanVisitor visitor)
visitor
- an AutoBeanVisitor
T as()
T
interface which will
delegate to the underlying wrapped object, if any.@Deprecated AutoBean<T> clone(boolean deep)
UnsupportedOperationException
. The
implementation of this method in previous releases was not sufficiently
robust and there are no further uses of this method within the GWT code
base. Furthermore, there are many different semantics that can be applied
to a cloning process that cannot be adequately addressed with a single
implementation.
A simple clone of an acyclic datastructure can be created by using
AutoBeanCodex
to encode and decode the root object. Other cloning
algorithms are best implemented by using an AutoBeanVisitor
.
java.lang.UnsupportedOperationException
AutoBeanFactory getFactory()
<Q> Q getTag(java.lang.String tagName)
setTag(String, Object)
.tagName
- the tag namesetTag(String, Object)
java.lang.Class<T> getType()
boolean isFrozen()
setFrozen(boolean)
, or
false
if it has never been called.true
if this instance is frozenboolean isWrapper()
true
if the AutoBean was provided with an external object.true
if this instance is a wrappervoid setFrozen(boolean frozen)
IllegalStateException
.frozen
- if true
, freeze this instancevoid setTag(java.lang.String tagName, java.lang.Object value)
tagName
- the tag namevalue
- the wrapped valuegetTag(String)
T unwrap()
java.lang.IllegalStateException
- if the AutoBean is not a wrapper