org.silverpeas.token
Class TokenGeneratorProvider

java.lang.Object
  extended by org.silverpeas.token.TokenGeneratorProvider

public class TokenGeneratorProvider
extends Object

A provider of a token generator according to the type of tokens to generate. A token isn't simply just an atom or a symbol. It has a type that is related to the way it is used. Because the use of tokens differ, their value (the atom) cannot follow the same pattern and therefore they have to be generated in the way that matches their use. It is why the tokens differ by their type and their generation is related to their type.

Author:
mmoquillon

Constructor Summary
TokenGeneratorProvider()
           
 
Method Summary
static TokenGenerator getTokenGenerator(Class<? extends Token> type)
          Gets the generator mapped with the specified token type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenGeneratorProvider

public TokenGeneratorProvider()
Method Detail

getTokenGenerator

public static TokenGenerator getTokenGenerator(Class<? extends Token> type)
Gets the generator mapped with the specified token type.

Parameters:
type - the type of the token.
Returns:
the token generator mapped with the specified token type.
Throws:
TokenGenerationException - if the token generator cannot be obtained.


Copyright © 2016 Silverpeas. All Rights Reserved.