fr.umlv.corosol.classfile.attribute.impl
Class JUnknownAttribute

java.lang.Object
  extended by fr.umlv.corosol.classfile.attribute.impl.AbstractJAttribute
      extended by fr.umlv.corosol.classfile.attribute.impl.JUnknownAttribute
All Implemented Interfaces:
JAttribute, JClassFileItem, JObject

public class JUnknownAttribute
extends AbstractJAttribute

This class represents an attribute unknown by the Java virtual machine.

Author:
Christophe Deleray

Field Summary
 
Fields inherited from interface fr.umlv.corosol.classfile.attribute.JAttribute
CODE, CONSTANT_VALUE, DEPRECATED, EXCEPTIONS, INNER_CLASSES, LINE_NUMBER_TABLE, LOCAL_VARIABLE_TABLE, SOURCE_FILE, SYNTHETIC
 
Constructor Summary
JUnknownAttribute(java.lang.String name)
          Creates a new JVM-unknown attribute which name is specified.
 
Method Summary
 int getSize()
          Returns the size of the attribute in bytes.
 void readItem(JClassFileInput in)
          Extracts the data of this attribute from the specified input stream.
 java.lang.String toString()
          Returns a string representation of this attribute.
 void writeItem(JClassFileOutput out)
          Writes the data of this attribute into a file via the specified output stream.
 
Methods inherited from class fr.umlv.corosol.classfile.attribute.impl.AbstractJAttribute
getConstantPool, getName, setConstantPool
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JUnknownAttribute

public JUnknownAttribute(java.lang.String name)
Creates a new JVM-unknown attribute which name is specified.

Parameters:
name - the name of this attribute
Method Detail

getSize

public int getSize()
Returns the size of the attribute in bytes.

Specified by:
getSize in interface JAttribute
Specified by:
getSize in class AbstractJAttribute

toString

public java.lang.String toString()
Returns a string representation of this attribute.

Specified by:
toString in interface JAttribute
Specified by:
toString in class AbstractJAttribute
Returns:
a string representing this classfile attribute

readItem

public void readItem(JClassFileInput in)
              throws java.io.IOException
Extracts the data of this attribute from the specified input stream.

Parameters:
in - a class file input stream
Throws:
java.io.IOException - if an I/O error occurs when reading the datas of this attribute

writeItem

public void writeItem(JClassFileOutput out)
               throws java.io.IOException
Writes the data of this attribute into a file via the specified output stream.

Parameters:
out - a class file output stream
Throws:
java.io.IOException - if an I/O error occurs when writing into the classfile