if(o instanceof JavaObject ) {
Struct sct = toStruct(((JavaObject)o).getEmbededObject(null),null,caseSensitive);
if(sct!=null) return sct;
JavaObject jo = (JavaObject)o;
return new ObjectStruct(jo);
}
return toStruct(((ObjectWrap)o).getEmbededObject(),caseSensitive);
}
if(Decision.isSimpleValue(o) || Decision.isArray(o))
throw new CasterException(o,"Struct");
if(o instanceof Collection) return new CollectionStruct((Collection)o);
if ( o == null )
throw new CasterException( "null can not be casted to a Struct" );
return new ObjectStruct(o);
}