Struct scp=new StructImpl();
sct.set(KeyConstants._script,scp);
scp.set("rtexpr", Caster.toBoolean(script.getRtexpr()));
scp.set(KeyConstants._type, script.getTypeAsString());
if(script.getType()==TagLibTagScript.TYPE_SINGLE) {
TagLibTagAttr attr = script.getSingleAttr();
if(attr!=null)scp.set("singletype", attr.getScriptSupportAsString());
else scp.set("singletype", "none");
}
}
sct.set(KeyConstants._type,"java");
Struct _args=new StructImpl();
sct.set(KeyConstants._attributes,_args);
Map atts = tag.getAttributes();
Iterator it = atts.keySet().iterator();
while(it.hasNext()) {
Object key = it.next();
TagLibTagAttr attr=(TagLibTagAttr) atts.get(key);
if(attr.getHidden()) continue;
//for(int i=0;i<args.size();i++) {
Struct _arg=new StructImpl();
_arg.set(KeyConstants._status,TagLibFactory.toStatus(attr.getStatus()));
_arg.set(KeyConstants._description,attr.getDescription());
_arg.set(KeyConstants._type,attr.getType());
if(attr.getValues()!=null)_arg.set(KeyConstants._values,Caster.toArray(attr.getValues()));
if(attr.getDefaultValue()!=null)_arg.set("defaultValue",attr.getDefaultValue());
_arg.set(KeyConstants._required,attr.isRequired()?Boolean.TRUE:Boolean.FALSE);
_arg.set("scriptSupport",attr.getScriptSupportAsString());
_args.setEL(attr.getName(),_arg);
}
return sct;
}