edu.rit.classfile
Class NamedClassReference

java.lang.Object
  extended by edu.rit.classfile.TypeReference
      extended by edu.rit.classfile.ArrayOrClassReference
          extended by edu.rit.classfile.ClassReference
              extended by edu.rit.classfile.NamedClassReference

public class NamedClassReference
extends ClassReference

Class NamedClassReference is used to create a class reference given the class name. In the documentation below, the term "referenced class" means "the class referred to by this named class reference object."

An instance of class NamedClassReference can be written to a data output stream using the write() method below, and an instance of class NamedClassReference can be read from a data input stream using the static TypeReference.read() method.


Field Summary
static NamedClassReference JAVA_LANG_OBJECT
          A class reference for class java.lang.Object.
static NamedClassReference JAVA_LANG_STRING
          A class reference for class java.lang.String.
 
Constructor Summary
NamedClassReference(String theClassName)
          Construct a new named class reference.
 
Method Summary
 void write(DataOutput theDataOutput)
          Write this named class reference to the given data output stream.
 
Methods inherited from class edu.rit.classfile.ClassReference
getClassName, getSimpleName
 
Methods inherited from class edu.rit.classfile.ArrayOrClassReference
getClassInternalName
 
Methods inherited from class edu.rit.classfile.TypeReference
equals, getTypeDescriptor, getWordCount, hashCode, read, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JAVA_LANG_OBJECT

public static final NamedClassReference JAVA_LANG_OBJECT
A class reference for class java.lang.Object.


JAVA_LANG_STRING

public static final NamedClassReference JAVA_LANG_STRING
A class reference for class java.lang.String.

Constructor Detail

NamedClassReference

public NamedClassReference(String theClassName)
Construct a new named class reference.

Parameters:
theClassName - Referenced class's fully-qualified name. The fully qualified class name uses periods, for example: "com.foo.Bar".
Throws:
NullPointerException - (unchecked exception) Thrown if theClassName is null.
IllegalArgumentException - (unchecked exception) Thrown if theClassName is zero length.
Method Detail

write

public void write(DataOutput theDataOutput)
           throws IOException
Write this named class reference to the given data output stream.

Overrides:
write in class TypeReference
Parameters:
theDataOutput - Data output stream to write.
Throws:
IOException - Thrown if an I/O error occurred.


Copyright © 2001-2006 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.