Public Member Functions | Static Public Member Functions | Protected Attributes

jde.wizards.MethodFactory Class Reference

Inheritance diagram for jde.wizards.MethodFactory:
jde.wizards.ClassRegistry jde.wizards.InterfaceFactory jde.wizards.MethodOverrideFactory

List of all members.

Public Member Functions

 MethodFactory ()
 MethodFactory (NameFactory factory)
void setNameFactory (NameFactory factory)
NameFactory getNameFactory ()
Hashtable getImports ()
void registerImport (Class register)
String getMethodSkeleton (Signature sig, boolean javadoc, boolean newline, String todo)
void flush ()

Static Public Member Functions

static void println (String s)

Protected Attributes

Hashtable imports = new Hashtable()
NameFactory namefactory = null

Detailed Description

Defines a factory for creating skeleton implementations of Java interfaces. The factory can be invoked from the command line or from another program. The factory can generate implementations for multiple interfaces when invoked from the command line.

Author:
Eric D. Friedman and Paul Kinnucan
Version:
Revision:
1.26

Constructor & Destructor Documentation

jde.wizards.MethodFactory.MethodFactory (  ) 

Constructs a default method factory.

jde.wizards.MethodFactory.MethodFactory ( NameFactory  factory  ) 

Creates a method factory that uses the specified NameFactory for generating parameter names

Parameters:
factory Factory for generating parameter names

References jde.wizards.MethodFactory.namefactory.


Member Function Documentation

void jde.wizards.MethodFactory.flush (  ) 

Clears the import hashtables for this factory so it can be re-used to process a new set of methods.

Reimplemented in jde.wizards.InterfaceFactory, and jde.wizards.MethodOverrideFactory.

References jde.wizards.MethodFactory.imports.

Hashtable jde.wizards.MethodFactory.getImports (  ) 

Gets a table containing the classes that must be imported to implement an interface generated by this factory.

Returns:
Classes required to implement the current interface.

References jde.wizards.MethodFactory.imports.

String jde.wizards.MethodFactory.getMethodSkeleton ( Signature  sig,
boolean  javadoc,
boolean  newline,
String  todo 
)
NameFactory jde.wizards.MethodFactory.getNameFactory (  ) 

Gets the factory used to generating parameter names for methods generated by this interface factory.

Returns:
Name factory

Implements jde.wizards.ClassRegistry.

References jde.wizards.MethodFactory.namefactory.

void jde.wizards.MethodFactory.registerImport ( Class  register  ) 

Registers a class that needs to be imported by the interface implementation generated by this factory. Store the class in the import hashtable if it passes the shouldImport test. Arrays have to be handled differently here.

Parameters:
register Imported class candidate

Implements jde.wizards.ClassRegistry.

References jde.wizards.MethodFactory.imports.

Referenced by jde.wizards.MethodOverrideFactory.getMethodSkeleton().

void jde.wizards.MethodFactory.setNameFactory ( NameFactory  factory  ) 

Sets the factory for generating parameter names.

Parameters:
factory Factory for generating parameter names.

References jde.wizards.MethodFactory.namefactory.


Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties