pt.digitalis.utils.ioc
Enum ModuleParser

java.lang.Object
  extended by java.lang.Enum<ModuleParser>
      extended by pt.digitalis.utils.ioc.ModuleParser
All Implemented Interfaces:
Serializable, Comparable<ModuleParser>

public enum ModuleParser
extends Enum<ModuleParser>

The IoC module parsing modes.

Author:
Pedro Viegas pviegas@digitalis.pt, Rodrigo Gonçalves rgoncalves@digitalis.pt

Enum Constant Summary
CRAWLER
          Searches all classPath entries in the file system, opening up directories and ZIP files.
FAST
          Uses the classPath getSystemResources() for fast detection.
PARANOID
          When all else fails, combines the previous methods for complete discovery.
 
Method Summary
static ModuleParser getParsingMethodByName(String name)
          Returns the parsing method of a given name.
static ModuleParser valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ModuleParser[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FAST

public static final ModuleParser FAST
Uses the classPath getSystemResources() for fast detection.


CRAWLER

public static final ModuleParser CRAWLER
Searches all classPath entries in the file system, opening up directories and ZIP files.


PARANOID

public static final ModuleParser PARANOID
When all else fails, combines the previous methods for complete discovery. For ClassLoader nightmare solving, but slow.

Method Detail

values

public static ModuleParser[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ModuleParser c : ModuleParser.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ModuleParser valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getParsingMethodByName

public static ModuleParser getParsingMethodByName(String name)
Returns the parsing method of a given name.

Parameters:
name - selected method name
Returns:
the Module Parsing method for the given name


Copyright © 2012 Digitalis Informática Lda. All Rights Reserved.