Methods Summary |
---|
public final boolean | equals(java.lang.Object rhs)
if (! (rhs instanceof ClassDescriptor)) return false;
final ClassDescriptor _rhs = (ClassDescriptor) rhs;
if (hashCode () != _rhs.hashCode ()) return false;
if (! m_name.equals (_rhs.m_name)) return false;
if (! m_packageVMName.equals (_rhs.m_packageVMName)) return false;
return true;
|
public final java.lang.String | getClassVMName()
// TODO: use Descriptors API?
if (m_packageVMName.length () == 0)
return m_name;
else
return new StringBuffer (m_packageVMName).append ("/").append (m_name).toString ();
|
public final MethodDescriptor[] | getMethods()
return m_methods; // no defensive copy
|
public final java.lang.String | getName()
return m_name;
|
public final java.lang.String | getPackageVMName()
return m_packageVMName;
|
public final java.lang.String | getSrcFileName()
return m_srcFileName;
|
public final long | getStamp()
return m_stamp;
|
public final boolean | hasCompleteLineNumberInfo()
return m_hasCompleteLineNumberInfo;
|
public final boolean | hasSrcFileInfo()
return m_srcFileName != null;
|
public final int | hashCode()
if (m_hash == 0)
{
final int hash = m_name.hashCode () + 16661 * m_packageVMName.hashCode ();
m_hash = hash;
return hash;
}
return m_hash;
|
static com.vladium.emma.data.ClassDescriptor | readExternal(java.io.DataInput in)
final String packageVMName = in.readUTF ();
final String name = in.readUTF ();
final long stamp = in.readLong ();
final byte srcFileNameFlag = in.readByte ();
final String srcFileName = srcFileNameFlag != 0 ? in.readUTF () : null;
final int length = in.readInt ();
final MethodDescriptor [] methods = new MethodDescriptor [length];
for (int i = 0; i < length; ++ i)
{
methods [i] = MethodDescriptor.readExternal (in);
}
return new ClassDescriptor (packageVMName, name, stamp, srcFileName, methods);
|
public java.lang.String | toString()
return toString ("");
|
public java.lang.String | toString(java.lang.String indent)
StringBuffer s = new StringBuffer (indent + "class [" + (m_packageVMName.length () > 0 ? m_packageVMName + "/" : "") + m_name + "] descriptor:");
for (int m = 0; m < m_methods.length; ++ m)
{
s.append (EOL);
s.append (m_methods [m].toString (indent + INDENT_INCREMENT));
}
return s.toString ();
|
static void | writeExternal(com.vladium.emma.data.ClassDescriptor cls, java.io.DataOutput out)
out.writeUTF (cls.m_packageVMName);
out.writeUTF (cls.m_name);
out.writeLong (cls.m_stamp);
if (cls.m_srcFileName != null)
{
out.writeByte (1);
out.writeUTF (cls.m_srcFileName);
}
else
{
out.writeByte (0);
}
final MethodDescriptor [] methods = cls.m_methods;
final int length = methods.length;
out.writeInt (length);
for (int i = 0; i < length; ++ i)
{
MethodDescriptor.writeExternal (methods [i], out);
}
// [m_hash and m_hasCompleteLineNumberInfo are transient data]
|