uchicago.src.sim.parameter.rpl
Class JavaClass

java.lang.Object
  extended by uchicago.src.sim.parameter.rpl.JavaClass

public class JavaClass
extends java.lang.Object

Represents a Java class when references in the RPLCompiler.

Version:
$Revision: 1.4 $ $Date: 2004/10/19 18:12:54 $

Constructor Summary
JavaClass(java.lang.Class clazz)
          Creates a JavaClass for the specified class.
 
Method Summary
 java.lang.String getShortName()
          Gets the short unqualified name of the class represented by this JavaClass.
 java.lang.Class getStaticFieldType(java.lang.String fieldName)
          Returns the type of the named static field.
 java.lang.Object getStaticFieldValue(java.lang.String fieldName)
          Returns the value of the named static field.
 boolean hasStaticField(java.lang.String fieldName)
          Returns true if the specified fieldName is a static field in the class represented by this JavaClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaClass

public JavaClass(java.lang.Class clazz)
Creates a JavaClass for the specified class.

Parameters:
clazz - the Class to create this JavaClass for.
Method Detail

getShortName

public java.lang.String getShortName()
Gets the short unqualified name of the class represented by this JavaClass.


hasStaticField

public boolean hasStaticField(java.lang.String fieldName)
Returns true if the specified fieldName is a static field in the class represented by this JavaClass. Otherwise false.

Parameters:
fieldName - the name of the field

getStaticFieldType

public java.lang.Class getStaticFieldType(java.lang.String fieldName)
Returns the type of the named static field. If the class represented by this JavaClass has no such field then a NoSuchElementException is thrown.

Parameters:
fieldName - the name of the field
Throws:
java.util.NoSuchElementException - if the named field is not found.

getStaticFieldValue

public java.lang.Object getStaticFieldValue(java.lang.String fieldName)
Returns the value of the named static field. If the class represented by this JavaClass has no such field then a NoSuchElementException is thrown.

Parameters:
fieldName - the name of the field
Throws:
java.util.NoSuchElementException - if the named field is not found.