1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.5.0_16) on Sat Jan 23 11:55:17 GMT 2010 -->
10
<META NAME="keywords" CONTENT="org.simpleframework.xml.strategy.Value interface">
12
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
14
<SCRIPT type="text/javascript">
15
function windowTitle()
17
parent.document.title="Value";
25
<BODY BGCOLOR="white" onload="windowTitle();">
28
<!-- ========= START OF TOP NAVBAR ======= -->
29
<A NAME="navbar_top"><!-- --></A>
30
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
33
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34
<A NAME="navbar_top_firstrow"><!-- --></A>
35
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36
<TR ALIGN="center" VALIGN="top">
37
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
38
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
39
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
40
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
42
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
43
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
47
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
53
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
54
<A HREF="../../../../org/simpleframework/xml/strategy/Type.html" title="interface in org.simpleframework.xml.strategy"><B>PREV CLASS</B></A>
55
NEXT CLASS</FONT></TD>
56
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
57
<A HREF="../../../../index.html?org/simpleframework/xml/strategy/Value.html" target="_top"><B>FRAMES</B></A>
58
<A HREF="Value.html" target="_top"><B>NO FRAMES</B></A>
59
<SCRIPT type="text/javascript">
62
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
74
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
75
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
76
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
80
<A NAME="skip-navbar_top"></A>
81
<!-- ========= END OF TOP NAVBAR ========= -->
84
<!-- ======== START OF CLASS DATA ======== -->
87
org.simpleframework.xml.strategy</FONT>
92
<DT><PRE>public interface <B>Value</B></DL>
96
The <code>Value</code> object describes a type that is represented
97
by an XML element. This enables a <code>Strategy</code> to define
98
not only the type an element represents, but also defines if that
99
type needs to be created. This allows arrays as well as standard
100
object types to be described. When instantiated the instance should
101
be set on the value object for use by the strategy to detect cycles.
106
<DT><B>Author:</B></DT>
107
<DD>Niall Gallagher</DD>
108
<DT><B>See Also:</B><DD><A HREF="../../../../org/simpleframework/xml/strategy/Strategy.html" title="interface in org.simpleframework.xml.strategy"><CODE>Strategy</CODE></A></DL>
113
<!-- ========== METHOD SUMMARY =========== -->
115
<A NAME="method_summary"><!-- --></A>
116
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
117
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
118
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
119
<B>Method Summary</B></FONT></TH>
121
<TR BGCOLOR="white" CLASS="TableRowColor">
122
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
123
<CODE> int</CODE></FONT></TD>
124
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/strategy/Value.html#getLength()">getLength</A></B>()</CODE>
127
This returns the length of the array that is to be allocated.</TD>
129
<TR BGCOLOR="white" CLASS="TableRowColor">
130
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
131
<CODE> java.lang.Class</CODE></FONT></TD>
132
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/strategy/Value.html#getType()">getType</A></B>()</CODE>
135
This is the type of the object instance this represents.</TD>
137
<TR BGCOLOR="white" CLASS="TableRowColor">
138
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139
<CODE> java.lang.Object</CODE></FONT></TD>
140
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/strategy/Value.html#getValue()">getValue</A></B>()</CODE>
143
This method is used to acquire an instance of the type that
144
is defined by this object.</TD>
146
<TR BGCOLOR="white" CLASS="TableRowColor">
147
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
148
<CODE> boolean</CODE></FONT></TD>
149
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/strategy/Value.html#isReference()">isReference</A></B>()</CODE>
152
This will return true if the object represents a reference.</TD>
154
<TR BGCOLOR="white" CLASS="TableRowColor">
155
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
156
<CODE> void</CODE></FONT></TD>
157
<TD><CODE><B><A HREF="../../../../org/simpleframework/xml/strategy/Value.html#setValue(java.lang.Object)">setValue</A></B>(java.lang.Object value)</CODE>
160
This method is used set the value within this object.</TD>
166
<!-- ============ METHOD DETAIL ========== -->
168
<A NAME="method_detail"><!-- --></A>
169
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
170
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
171
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
172
<B>Method Detail</B></FONT></TH>
176
<A NAME="getValue()"><!-- --></A><H3>
179
java.lang.Object <B>getValue</B>()</PRE>
181
<DD>This method is used to acquire an instance of the type that
182
is defined by this object. If the value has not been set
183
then this method will return null if this is not a reference.
187
<DT><B>Returns:</B><DD>an instance of the type this object represents</DL>
192
<A NAME="setValue(java.lang.Object)"><!-- --></A><H3>
195
void <B>setValue</B>(java.lang.Object value)</PRE>
197
<DD>This method is used set the value within this object. Once
198
this is set then the <code>getValue</code> method will return
199
the object that has been provided for consistency.
202
<DT><B>Parameters:</B><DD><CODE>value</CODE> - this is the value to insert as the type</DL>
207
<A NAME="getType()"><!-- --></A><H3>
210
java.lang.Class <B>getType</B>()</PRE>
212
<DD>This is the type of the object instance this represents. The
213
type returned by this is used to instantiate an object which
214
will be set on this value and the internal graph maintained.
218
<DT><B>Returns:</B><DD>the type of the object that must be instantiated</DL>
223
<A NAME="getLength()"><!-- --></A><H3>
226
int <B>getLength</B>()</PRE>
228
<DD>This returns the length of the array that is to be allocated.
229
If this value does not represent an array then this should
230
return zero to indicate that it is not an array object.
234
<DT><B>Returns:</B><DD>this returns the number of elements for the array</DL>
239
<A NAME="isReference()"><!-- --></A><H3>
242
boolean <B>isReference</B>()</PRE>
244
<DD>This will return true if the object represents a reference.
245
A reference will provide a valid instance when this objects
246
getter is invoked. A valid instance can be a null.
250
<DT><B>Returns:</B><DD>this returns true if this represents a reference</DL>
253
<!-- ========= END OF CLASS DATA ========= -->
257
<!-- ======= START OF BOTTOM NAVBAR ====== -->
258
<A NAME="navbar_bottom"><!-- --></A>
259
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
260
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
262
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
263
<A NAME="navbar_bottom_firstrow"><!-- --></A>
264
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
265
<TR ALIGN="center" VALIGN="top">
266
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
267
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
268
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
269
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
270
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
271
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
272
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
276
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
282
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
283
<A HREF="../../../../org/simpleframework/xml/strategy/Type.html" title="interface in org.simpleframework.xml.strategy"><B>PREV CLASS</B></A>
284
NEXT CLASS</FONT></TD>
285
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
286
<A HREF="../../../../index.html?org/simpleframework/xml/strategy/Value.html" target="_top"><B>FRAMES</B></A>
287
<A HREF="Value.html" target="_top"><B>NO FRAMES</B></A>
288
<SCRIPT type="text/javascript">
291
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
296
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
303
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
304
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
305
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
306
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
309
<A NAME="skip-navbar_bottom"></A>
310
<!-- ======== END OF BOTTOM NAVBAR ======= -->