1
0
mirror of https://github.com/etesync/android synced 2025-07-05 06:12:36 +00:00
etesync-android/libs/simple-xml-2.7/javadoc/org/simpleframework/xml/ElementArray.html
2013-09-18 20:03:36 +02:00

364 lines
13 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_37) on Mon Feb 18 20:39:44 EST 2013 -->
<TITLE>
ElementArray
</TITLE>
<META NAME="date" CONTENT="2013-02-18">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ElementArray";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/simpleframework/xml/Element.html" title="annotation in org.simpleframework.xml"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/simpleframework/xml/ElementList.html" title="annotation in org.simpleframework.xml"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/simpleframework/xml/ElementArray.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ElementArray.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.simpleframework.xml</FONT>
<BR>
Annotation Type ElementArray</H2>
<HR>
<DL>
<DT><PRE><FONT SIZE="-1">@Retention(value=RUNTIME)
</FONT>public @interface <B>ElementArray</B></DL>
</PRE>
<P>
The <code>ElementArray</code> annotation represents a method or
field that is an array of elements. The array deserialized is the
same type as the field or method, all entries within the array
must be a compatible type. However, a <code>class</code> attribute
can be used to override an entry, this must be an assignable type.
<pre>
&lt;array length="3"&gt;
&lt;entry&gt;
&lt;value&gt;example text value&lt;/value&gt;
&lt;/entry&gt;
&lt;entry&gt;
&lt;value&gt;some other value&lt;/value&gt;
&lt;/entry&gt;
&lt;entry/&gt;
&lt;/array&gt;
</pre>
All null objects within the array are represented as an empty XML
element so that they can be deserialized accurately. This ensures
that the length attribute of the array is respected, as well as
the index position of all serialized entries. The length of the
array must be specified for deserialization to instantiate the
array before the array values are instantiated. This is required
to account for cyclical references in the object graph.
<P>
<P>
<DL>
<DT><B>Author:</B></DT>
<DD>Niall Gallagher</DD>
</DL>
<HR>
<P>
<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
<A NAME="annotation_type_optional_element_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Optional Element Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/ElementArray.html#data()">data</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is used to determine whether the element data is written
in a CDATA block or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/ElementArray.html#empty()">empty</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is used to determine if an optional field or method can
remain null if it does not exist.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/ElementArray.html#entry()">entry</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This is used to provide a name of the XML element representing
the entry within the array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/ElementArray.html#name()">name</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This represents the name of the XML element.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/simpleframework/xml/ElementArray.html#required()">required</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines whether the element is required within the XML
document.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<A NAME="name()"><!-- --></A><H3>
name</H3>
<PRE>
public abstract java.lang.String <B>name</B></PRE>
<DL>
<DD>This represents the name of the XML element. Annotated fields
or methods can optionally provide the name of the element. If
no name is provided then the name of the annotated field or
method will be used in its place. The name is provided if the
field or method name is not suitable as an XML element name.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the name of the XML element this represents</DL>
<DL>
<DT><B>Default:</B><DD>""</DD>
</DL>
</DL>
<HR>
<A NAME="entry()"><!-- --></A><H3>
entry</H3>
<PRE>
public abstract java.lang.String <B>entry</B></PRE>
<DL>
<DD>This is used to provide a name of the XML element representing
the entry within the array. An entry name is optional and is
used when the name needs to be overridden. This also ensures
that entry, regardless of type has the same root name.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>this returns the entry XML element for each value</DL>
<DL>
<DT><B>Default:</B><DD>""</DD>
</DL>
</DL>
<HR>
<A NAME="data()"><!-- --></A><H3>
data</H3>
<PRE>
public abstract boolean <B>data</B></PRE>
<DL>
<DD>This is used to determine whether the element data is written
in a CDATA block or not. If this is set to true then the text
is written within a CDATA block, by default the text is output
as escaped XML. Typically this is useful when this annotation
is applied to an array of primitives, such as strings.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if entries are to be wrapped in a CDATA block</DL>
<DL>
<DT><B>Default:</B><DD>false</DD>
</DL>
</DL>
<HR>
<A NAME="required()"><!-- --></A><H3>
required</H3>
<PRE>
public abstract boolean <B>required</B></PRE>
<DL>
<DD>Determines whether the element is required within the XML
document. Any field marked as not required will not have its
value set when the object is deserialized. If an object is to
be serialized only a null attribute will not appear as XML.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if the element is required, false otherwise</DL>
<DL>
<DT><B>Default:</B><DD>true</DD>
</DL>
</DL>
<HR>
<A NAME="empty()"><!-- --></A><H3>
empty</H3>
<PRE>
public abstract boolean <B>empty</B></PRE>
<DL>
<DD>This is used to determine if an optional field or method can
remain null if it does not exist. If this is false then the
optional element is given an empty array. This is a convenience
attribute which avoids having to check if the element is null
before providing it with a suitable default instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>false if an optional element is always instantiated</DL>
<DL>
<DT><B>Default:</B><DD>true</DD>
</DL>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/simpleframework/xml/Element.html" title="annotation in org.simpleframework.xml"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/simpleframework/xml/ElementList.html" title="annotation in org.simpleframework.xml"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/simpleframework/xml/ElementArray.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="ElementArray.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;<A HREF="#annotation_type_optional_element_summary">OPTIONAL</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#annotation_type_element_detail">ELEMENT</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>