Methods Summary |
---|
public void | accept(IAttributeVisitor visitor, java.lang.Object ctx)
visitor.visit (this, ctx);
|
public java.lang.Object | clone()Performs a deep copy.
final InnerClassesAttribute_info _clone = (InnerClassesAttribute_info) super.clone ();
final List/* InnerClass_info */ classes = m_classes;
// do deep copy:
final int class_count = classes.size (); // use size() if class becomes non-final
_clone.m_classes = new ArrayList (class_count);
for (int e = 0; e < class_count; ++ e)
{
_clone.m_classes.add (((InnerClass_info) classes.get (e)).clone ());
}
return _clone;
|
public final InnerClass_info | get(int offset)Returns {@link InnerClass_info} descriptor at a given offset.
return (InnerClass_info) m_classes.get (offset);
|
public final long | length()
return 8 + (m_classes.size () << 3); // use size() if class becomes non-final
|
public boolean | makesClassNested(int class_index, int[] nestedAccessFlags)
if (class_index > 0)
{
// TODO: avoid linear loop by keeping all class indices in a bitset
for (int i = 0, iLimit = size (); i < iLimit; ++ i)
{
final InnerClass_info info = get (i);
if (info.m_inner_class_index == class_index)
{
nestedAccessFlags [0] = info.m_inner_access_flags;
return true;
}
}
}
return false;
|
public final int | size()Returns the number of descriptors in this collection [can be 0].
return m_classes.size ();
|
public java.lang.String | toString()
final StringBuffer s = new StringBuffer ("InnerClassesAttribute_info: [attribute_name_index = " + m_name_index + ", attribute_length = " + length () + "]\n");
for (int l = 0; l < size (); ++ l)
{
s.append (" " + get (l));
s.append ("\n"); // TODO: proper EOL const
}
return s.toString ();
|
public void | writeInClassFormat(com.vladium.jcd.lib.UDataOutputStream out)
super.writeInClassFormat (out);
final List/* InnerClass_info */ classes = m_classes;
final int class_count = classes.size (); // use size() if class becomes non-final
out.writeU2 (class_count);
for (int l = 0; l < class_count; ++ l)
{
((InnerClass_info) classes.get (l)).writeInClassFormat (out);
}
|