public Begin construct(Object underlying)
{
if(underlying instanceof List)
{
List list = (List) underlying;
Begin obj = new Begin();
int position = 0;
final int size = list.size();
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
try
{
obj.setRemoteChannel( (UnsignedShort) val );
}
catch(ClassCastException e)
{
// TODO Error
}
}
}
else
{
return obj;
}
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
try
{
obj.setNextOutgoingId( (UnsignedInteger) val );
}
catch(ClassCastException e)
{
// TODO Error
}
}
}
else
{
return obj;
}
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
try
{
obj.setIncomingWindow( (UnsignedInteger) val );
}
catch(ClassCastException e)
{
// TODO Error
}
}
}
else
{
return obj;
}
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
try
{
obj.setOutgoingWindow( (UnsignedInteger) val );
}
catch(ClassCastException e)
{
// TODO Error
}
}
}
else
{
return obj;
}
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
try
{
obj.setHandleMax( (UnsignedInteger) val );
}
catch(ClassCastException e)
{
// TODO Error
}
}
}
else
{
return obj;
}
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
if (val instanceof Symbol[] )
{
obj.setOfferedCapabilities( (Symbol[]) val );
}
else
{
try
{
obj.setOfferedCapabilities( new Symbol[] { (Symbol) val } );
}
catch(ClassCastException e)
{
// TODO Error
}
}
}
}
else
{
return obj;
}
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
if (val instanceof Symbol[] )
{
obj.setDesiredCapabilities( (Symbol[]) val );
}
else
{
try
{
obj.setDesiredCapabilities( new Symbol[] { (Symbol) val } );
}
catch(ClassCastException e)
{
// TODO Error
}
}
}
}
else
{
return obj;
}
if(position < size)
{
Object val = list.get(position);
position++;
if(val != null)
{
try
{
obj.setProperties( (Map) val );
}
catch(ClassCastException e)
{
// TODO Error