Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.puppycrawl.tools.checkstyle
Interface ModuleFactory

    public interface ModuleFactory

A module factory creates Objects from a given name. It's purpose is to map the shortnames like `AvoidStarImport` to full classnames like `com.puppycrawl.tools.checkstyle.checks.AvoidStarImportCheck`. A ModuleFactory can implement this name resolution by using naming conventions, fallback strategies, etc.

Version:
  $Revision: 1.7 $
Author:
  lkuehne

Method Summary
`Object` | `createModule(String aName)` Creates a new instance of a class from a given name.

Method Detail

### createModule

    Object createModule(String aName)
                        throws CheckstyleException

  Creates a new instance of a class from a given name. If the provided module name is a class name an instance of that class is returned. If the name is not a class name the ModuleFactory uses heuristics to find the corresponding class.

  Parameters:
    `aName` - the name of the module, might be a shortname
  Returns:
    the created module
  Throws:
    `CheckstyleException` - if no module can be instantiated from aName

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Back to the Checkstyle Home Page
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD