edu.rit.classfile
Class NamedClassReference
java.lang.Object
edu.rit.classfile.TypeReference
edu.rit.classfile.ArrayOrClassReference
edu.rit.classfile.ClassReference
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.
Method Summary |
void |
write(DataOutput theDataOutput)
Write this named class reference to the given data output stream. |
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.
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.
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.