koala.dynamicjava.classinfo
Class TreeMethodInfo

java.lang.Object
  |
  +--koala.dynamicjava.classinfo.TreeMethodInfo
All Implemented Interfaces:
MethodInfo

public class TreeMethodInfo
extends java.lang.Object
implements MethodInfo

The instances of this class provides informations about class methods not yet compiled to JVM bytecode.


Constructor Summary
TreeMethodInfo(MethodDeclaration f, ClassFinder cf, ClassInfo dc)
          Creates a new method info
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one
 ClassInfo[] getExceptionTypes()
          Returns an array of Class infos that represent the types of the exceptions declared to be thrown by the underlying method
 MethodDeclaration getMethodDeclaration()
          Returns the method declaration
 int getModifiers()
          Returns the modifiers for the method represented by this object
 java.lang.String getName()
          Returns the name of the underlying method
 ClassInfo[] getParameterTypes()
          Returns an array of class infos that represent the parameter types, in declaration order, of the method represented by this object
 ClassInfo getReturnType()
          Returns a Class object that represents the return type of the method represented by this object
protected  ClassInfo lookupClass(java.lang.String s, ClassInfo c)
          Looks for a class from its name
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeMethodInfo

public TreeMethodInfo(MethodDeclaration f,
                      ClassFinder cf,
                      ClassInfo dc)
Creates a new method info
Parameters:
f - the method tree
cf - the class finder
dc - the declaring class
Method Detail

getMethodDeclaration

public MethodDeclaration getMethodDeclaration()
Returns the method declaration

getModifiers

public int getModifiers()
Returns the modifiers for the method represented by this object
Specified by:
getModifiers in interface MethodInfo

getReturnType

public ClassInfo getReturnType()
Returns a Class object that represents the return type of the method represented by this object
Specified by:
getReturnType in interface MethodInfo

getName

public java.lang.String getName()
Returns the name of the underlying method
Specified by:
getName in interface MethodInfo

getParameterTypes

public ClassInfo[] getParameterTypes()
Returns an array of class infos that represent the parameter types, in declaration order, of the method represented by this object
Specified by:
getParameterTypes in interface MethodInfo

getExceptionTypes

public ClassInfo[] getExceptionTypes()
Returns an array of Class infos that represent the types of the exceptions declared to be thrown by the underlying method
Specified by:
getExceptionTypes in interface MethodInfo

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one
Overrides:
equals in class java.lang.Object

lookupClass

protected ClassInfo lookupClass(java.lang.String s,
                                ClassInfo c)
Looks for a class from its name
Parameters:
s - the name of the class to find
c - the context
Throws:
NoClassDefFoundError - if the class cannot be loaded


Copyright © 2001 Stephane Hillion. All Rights Reserved.