Пример #1
0
 public JSONObject buildJo(Member m) {
   JSONObject e = new JSONObject();
   e.put("level", m.getLevel().getLabel());
   e.put("caption", m.getLabel());
   e.put("depth", Integer.toString(m.getRootDistance()));
   addMemberPropertiesJo(e, m);
   return e;
 }
Пример #2
0
 public Element build(Member m) {
   Element e = table.elem("member");
   e.setAttribute("level", m.getLevel().getLabel());
   e.setAttribute("caption", m.getLabel());
   e.setAttribute("depth", Integer.toString(m.getRootDistance()));
   addMemberProperties(e, m);
   return e;
 }
Пример #3
0
 private Property[] visibleProperties(Member m) {
   Property[] src = m.getProperties();
   String scope = null;
   if (extension != null) scope = extension.getPropertyScope(m);
   List list = new ArrayList();
   for (int i = 0; i < src.length; i++) {
     Property p = src[i];
     if (PropertyUtils.isInline(p.getName())) continue;
     if (scope != null && visible != null) {
       if (visible.contains(scope, p.getName())) list.add(p);
     } else list.add(p);
   }
   return (Property[]) list.toArray(new Property[list.size()]);
 }