{
Class componentType = javaType.getComponentType();
boolean isComponentArray = componentType.isArray();
// Do not allow overrides i.e. byte[][] should not be base64Binary[]
JBossXSTypeDefinition xst = (isComponentArray) ? handleArray(null, componentType) : generateType(null, componentType);
String name;
String namespace;
if (xmlType != null)
{
name = xmlType.getLocalPart();
namespace = getNamespace(componentType, xmlType.getNamespaceURI());
}
else
{
if (isComponentArray == false)
{
name = utils.getJustClassName(componentType.getName()) + ".Array";
namespace = getNamespace(componentType, null);
}
else
{
name = xst.getName() + ".Array";
namespace = getNamespace(componentType, xst.getNamespace());
}
}
JBossXSParticle xsp = new JBossXSParticle();
xsp.setTerm(sutils.createXSElementDeclaration("value", xst, !componentType.isPrimitive()));