本文整理了Java中com.memoire.yapod.YapodLib.getAllFields()
方法的一些代码示例,展示了YapodLib.getAllFields()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YapodLib.getAllFields()
方法的具体详情如下:
包路径:com.memoire.yapod.YapodLib
类名称:YapodLib
方法名:getAllFields
暂无
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu
public static final Field getField(Class _class, String _name)
{
Field[] f=getAllFields(_class);
for(int i=f.length-1; i>=0; i--)
if(f[i].getName().equals(_name))
return f[i];
return null;
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu
public synchronized void write(Object _o)
{
StringBuffer r=new StringBuffer();
synchronized(_o)
{
r.append("{\n");
r.append(" id: ");
r.append(getId(_o));
r.append('\n');
r.append(" class: ");
r.append(_o.getClass().getName());
r.append('\n');
Field[] fields=YapodLib.getAllFields(_o.getClass());
for(int i=0;i<fields.length;i++)
write(_o,fields[i],r);
}
r.append("}\n");
out.print(r.toString());
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu
protected Object compute(Object _object)
{
YapodAssoc r=new YapodAssoc();
Field[] fields=YapodLib.getAllFields(_object.getClass());
for(int i=0;i<fields.length;i++)
{
String k=fields[i].getName();
Object v=YapodLib.getValue(_object,k);
r.put(k,v);
}
return r;
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu
Field[] fields=YapodLib.getAllFields(c);
for(int i=0;i<fields.length;i++)
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu
protected synchronized void writeObject(Object _o, OutputStream _w)
throws IOException
{
synchronized(_o)
{
String cn=_o.getClass().getName();
int j=cn.lastIndexOf('.');
if(j>=0) cn=cn.substring(j+1);
cn=cn.toLowerCase();
output(_w,"\n"+indente()+"<"+cn+
" id=\""+getId(_o)+"\">");
indentation_++;
Field[] fields=YapodLib.getAllFields(_o.getClass());
for(int i=0;i<fields.length;i++)
writeField(_o,fields[i],_w);
indentation_--;
output(_w,"\n"+indente()+"</"+cn+">");
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu
protected synchronized void writeObject(Object _o, StringBuffer _sb)
{
Class c=_o.getClass();
if(!(_o instanceof Serializable))
warning("Not serializable "+c.getName());
try
{
c.getMethod
("writeObject",new Class[] { ObjectOutputStream.class });
warning("Specific serialization for "+c.getName());
}
catch(NoSuchMethodException ex) { }
synchronized(_o)
{
_sb.append("INSERT INTO object VALUES ("+
getId(_o)+','+
getTypeAttr(_o)+','+
NULL+','+
NULL+");\n");
Field[] fields=YapodLib.getAllFields(_o.getClass());
for(int i=0;i<fields.length;i++)
writeField(_o,fields[i],_sb);
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-fu
protected synchronized void writeObject(Object _o, OutputStream _w)
throws IOException
{
Class c=_o.getClass();
// if(!(_o instanceof Serializable))
// warning("Not serializable "+c.getName());
try
{
c.getMethod
("writeObject",new Class[] { ObjectOutputStream.class });
warning("Specific serialization for "+c.getName());
}
catch(NoSuchMethodException ex) { }
synchronized(_o)
{
if(INDENTATION) output(_w,indente());
output(_w,"<object");
output(_w,getTypeAttr(_o));
output(_w," id=\"");
output(_w,getId(_o));
output(_w,"\">\n");
indentation_++;
Field[] fields=YapodLib.getAllFields(_o.getClass());
for(int i=0;i<fields.length;i++)
writeField(_o,fields[i],_w);
indentation_--;
if(INDENTATION) output(_w,indente());
output(_w,"</object>\n");
}
}
代码示例来源:origin: org.fudaa.framework.dodico/dodico-common
Field[] fields = (Field[]) classFields_.get(className);
if (fields == null) {
fields = YapodLib.getAllFields(objectToDo.getClass());
classFields_.put(className, fields);
内容来源于网络,如有侵权,请联系作者删除!