jeops.expressions
Class Classe

java.lang.Object
  |
  +--jeops.expressions.Classe

public class Classe
extends java.lang.Object

This class os a wrapper for the java.lang.Class class. It's used so we can redefine the getMethod(String,Class[]) method - what can't be done directly because Class is final.

Version:
0.02 29 Jun 1999 First version with comments in English.
Author:
Carlos Figueira Filho (csff@di.ufpe.br)

Constructor Summary
Classe(java.lang.Class classe)
          Class constructor.
 
Method Summary
 java.lang.reflect.Constructor getConstructor(java.lang.Class[] parameters)
          Searches, among the constructors of the wrapped class, one that is compatible to the given parameters.
 java.lang.reflect.Field getField(java.lang.String ident)
          Searches, among the fields of the wrapped class and its superclasses, one with the given name.
 java.lang.reflect.Method getMethod(java.lang.String ident, java.lang.Class[] parametros)
          Searches, among the methods of the wrapped class, one that is compatible to the given name and parameters.
 java.lang.String toString()
          Returns a String representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Classe

public Classe(java.lang.Class classe)
Class constructor.
Parameters:
classe - the class being wrapped.
Method Detail

getConstructor

public java.lang.reflect.Constructor getConstructor(java.lang.Class[] parameters)
                                             throws java.lang.NoSuchMethodException
Searches, among the constructors of the wrapped class, one that is compatible to the given parameters.
Parameters:
parameters - the clases of the parameters of the needed constructor.
Throws:
java.lang.NoSuchMethodException - if there is no constructor in the class that is compatible to the given parameters.

getField

public java.lang.reflect.Field getField(java.lang.String ident)
                                 throws java.lang.NoSuchFieldException
Searches, among the fields of the wrapped class and its superclasses, one with the given name.
Parameters:
ident - the name of the needed field.
Throws:
java.lang.NoSuchFieldException - if there's no field in the wrapped class with the given name.

getMethod

public java.lang.reflect.Method getMethod(java.lang.String ident,
                                          java.lang.Class[] parametros)
                                   throws java.lang.NoSuchMethodException
Searches, among the methods of the wrapped class, one that is compatible to the given name and parameters.
Parameters:
ident - the name of the needed method.
parameters - the clases of the parameters of the needed constructor.
Throws:
java.lang.NoSuchMethodException - if there is no method in the class that is compatible to the given name and parameters.

toString

public java.lang.String toString()
Returns a String representation of this object. Mirror of the method with the same name in the wrapped class. Useful for debugging.
Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object.