Fixed up javadoc comments. Removed some unneeded final declarations in
Methodfinder. git-svn-id: https://samskivert.googlecode.com/svn/trunk@337 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: Controller.java,v 1.5 2001/08/14 00:59:19 mdb Exp $
|
// $Id: Controller.java,v 1.6 2001/10/03 02:20:05 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -30,7 +30,7 @@ import com.samskivert.Log;
|
|||||||
/**
|
/**
|
||||||
* The controller class provides a basis for the separation of user
|
* The controller class provides a basis for the separation of user
|
||||||
* interface code into display code and control code. The display code
|
* interface code into display code and control code. The display code
|
||||||
* lives in a panel class ({@link javax.swing.JPanel} or something
|
* lives in a panel class (<code>javax.swing.JPanel</code> or something
|
||||||
* conceptually similar) and the control code lives in an associated
|
* conceptually similar) and the control code lives in an associated
|
||||||
* controller class.
|
* controller class.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ClassUtil.java,v 1.1 2001/10/03 02:09:12 mdb Exp $
|
// $Id: ClassUtil.java,v 1.2 2001/10/03 02:20:05 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -56,7 +56,7 @@ public class ClassUtil
|
|||||||
* @return an array of Class objects representing the classes of the
|
* @return an array of Class objects representing the classes of the
|
||||||
* objects in the given Object array. If args is null, a zero-length
|
* objects in the given Object array. If args is null, a zero-length
|
||||||
* Class array is returned. If an element in args is null, then
|
* Class array is returned. If an element in args is null, then
|
||||||
* {@link Void#TYPE} is the corresponding Class in the return array.
|
* Void.TYPE is the corresponding Class in the return array.
|
||||||
*/
|
*/
|
||||||
public static Class[] getParameterTypesFrom (Object[] args)
|
public static Class[] getParameterTypesFrom (Object[] args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: LoopingThread.java,v 1.4 2001/10/02 22:35:26 mdb Exp $
|
// $Id: LoopingThread.java,v 1.5 2001/10/03 02:20:05 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -47,8 +47,9 @@ public class LoopingThread extends Thread
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Processes the loop. Derived classes should override {@link iterate}
|
* Processes the loop. Derived classes should override {@link
|
||||||
* to perform whatever action needs to be performed inside the loop.
|
* #iterate} to perform whatever action needs to be performed inside
|
||||||
|
* the loop.
|
||||||
*/
|
*/
|
||||||
public void run ()
|
public void run ()
|
||||||
{
|
{
|
||||||
@@ -71,7 +72,7 @@ public class LoopingThread extends Thread
|
|||||||
/**
|
/**
|
||||||
* Called to wake the thread up from any blocking wait that it might
|
* Called to wake the thread up from any blocking wait that it might
|
||||||
* be in. This function should result in the thread exiting the {@link
|
* be in. This function should result in the thread exiting the {@link
|
||||||
* iterate} function as soon as possible so that the running flag can
|
* #iterate} function as soon as possible so that the running flag can
|
||||||
* be checked and the thread can cleanly exit.
|
* be checked and the thread can cleanly exit.
|
||||||
*/
|
*/
|
||||||
protected void kick ()
|
protected void kick ()
|
||||||
@@ -82,7 +83,7 @@ public class LoopingThread extends Thread
|
|||||||
/**
|
/**
|
||||||
* Called before the thread enters the processing loop. Any
|
* Called before the thread enters the processing loop. Any
|
||||||
* initialization that needs to be performed prior to the {@link
|
* initialization that needs to be performed prior to the {@link
|
||||||
* iterate} loop can be done here.
|
* #iterate} loop can be done here.
|
||||||
*/
|
*/
|
||||||
protected void willStart ()
|
protected void willStart ()
|
||||||
{
|
{
|
||||||
@@ -91,7 +92,7 @@ public class LoopingThread extends Thread
|
|||||||
/**
|
/**
|
||||||
* This is the main body of the loop. It will be called over and over
|
* This is the main body of the loop. It will be called over and over
|
||||||
* again until the thread is requested to exit via a call to {@link
|
* again until the thread is requested to exit via a call to {@link
|
||||||
* shutdown}. At minimum, a derived class must override this function
|
* #shutdown}. At minimum, a derived class must override this function
|
||||||
* and do something useful.
|
* and do something useful.
|
||||||
*/
|
*/
|
||||||
protected void iterate ()
|
protected void iterate ()
|
||||||
@@ -100,7 +101,7 @@ public class LoopingThread extends Thread
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If an exception propagates past {@link iterate}, it will be caught
|
* If an exception propagates past {@link #iterate}, it will be caught
|
||||||
* and supplied to this function, which may want to do something
|
* and supplied to this function, which may want to do something
|
||||||
* useful with it. Presently, the exception is logged and the thread
|
* useful with it. Presently, the exception is logged and the thread
|
||||||
* is allowed to terminate.
|
* is allowed to terminate.
|
||||||
@@ -117,7 +118,7 @@ public class LoopingThread extends Thread
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Called after the thread has been requested to exit. Any cleanup
|
* Called after the thread has been requested to exit. Any cleanup
|
||||||
* that should take place after the {@link iterate} loop has exited
|
* that should take place after the {@link #iterate} loop has exited
|
||||||
* can be done here.
|
* can be done here.
|
||||||
*/
|
*/
|
||||||
protected void didShutdown ()
|
protected void didShutdown ()
|
||||||
@@ -126,9 +127,9 @@ public class LoopingThread extends Thread
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether or not the thread should still be running. If a
|
* Indicates whether or not the thread should still be running. If a
|
||||||
* thread is calling this within {@link iterate}, it should exit
|
* thread is calling this within {@link #iterate}, it should exit
|
||||||
* quickly and cleanly if the function returns false. It is
|
* quickly and cleanly if the function returns false. It is
|
||||||
* automatically called as part of the {@link iterate} loop, so
|
* automatically called as part of the {@link #iterate} loop, so
|
||||||
* normally a derived-class won't have to call it.
|
* normally a derived-class won't have to call it.
|
||||||
*/
|
*/
|
||||||
protected synchronized boolean isRunning ()
|
protected synchronized boolean isRunning ()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: MethodFinder.java,v 1.1 2001/10/03 02:09:12 mdb Exp $
|
// $Id: MethodFinder.java,v 1.2 2001/10/03 02:20:05 mdb Exp $
|
||||||
//
|
//
|
||||||
// samskivert library - useful routines for java programs
|
// samskivert library - useful routines for java programs
|
||||||
// Copyright (C) 2001 Michael Bayne
|
// Copyright (C) 2001 Michael Bayne
|
||||||
@@ -49,7 +49,7 @@ import java.util.*;
|
|||||||
* Report, Vol. 5, No. 2, Feb. 2000, pp. 70-74.
|
* Report, Vol. 5, No. 2, Feb. 2000, pp. 70-74.
|
||||||
* </cite>
|
* </cite>
|
||||||
*/
|
*/
|
||||||
public final class MethodFinder
|
public class MethodFinder
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Constructs a method finder for the supplied class.
|
* Constructs a method finder for the supplied class.
|
||||||
@@ -96,7 +96,7 @@ public final class MethodFinder
|
|||||||
* that accepts the number and type of parameters in the given Class
|
* that accepts the number and type of parameters in the given Class
|
||||||
* array in a reflective invocation.
|
* array in a reflective invocation.
|
||||||
*
|
*
|
||||||
* <p> A null value or {@link Void#TYPE} in parameterTypes matches a
|
* <p> A null value or Void.TYPE parameterTypes matches a
|
||||||
* corresponding Object or array reference in a constructor's formal
|
* corresponding Object or array reference in a constructor's formal
|
||||||
* parameter list, but not a primitive formal parameter.
|
* parameter list, but not a primitive formal parameter.
|
||||||
*
|
*
|
||||||
@@ -128,8 +128,8 @@ public final class MethodFinder
|
|||||||
* the given name and accepts the number and type of parameters in the
|
* the given name and accepts the number and type of parameters in the
|
||||||
* given Class array in a reflective invocation.
|
* given Class array in a reflective invocation.
|
||||||
*
|
*
|
||||||
* <p> A null value or {@link Void#TYPE} in parameterTypes will match
|
* <p> A null value or Void.TYPE in parameterTypes will match a
|
||||||
* a corresponding Object or array reference in a method's formal
|
* corresponding Object or array reference in a method's formal
|
||||||
* parameter list, but not a primitive formal parameter.
|
* parameter list, but not a primitive formal parameter.
|
||||||
*
|
*
|
||||||
* @param methodName name of the method to search for.
|
* @param methodName name of the method to search for.
|
||||||
@@ -344,22 +344,22 @@ public final class MethodFinder
|
|||||||
/**
|
/**
|
||||||
* The target class to look for methods and constructors in.
|
* The target class to look for methods and constructors in.
|
||||||
*/
|
*/
|
||||||
private final Class clazz;
|
private Class clazz;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mapping from method name to the Methods in the target class with
|
* Mapping from method name to the Methods in the target class with
|
||||||
* that name.
|
* that name.
|
||||||
*/
|
*/
|
||||||
private final Map methodMap = null;
|
private Map methodMap = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of the Constructors in the target class.
|
* List of the Constructors in the target class.
|
||||||
*/
|
*/
|
||||||
private final List ctorList = null;
|
private List ctorList = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mapping from a Constructor or Method object to the Class objects
|
* Mapping from a Constructor or Method object to the Class objects
|
||||||
* representing its formal parameters.
|
* representing its formal parameters.
|
||||||
*/
|
*/
|
||||||
private final Map paramMap = new HashMap();
|
private Map paramMap = new HashMap();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user