org.jboss.weld.context.beanstore
Class AbstractNamingScheme

java.lang.Object
  extended by org.jboss.weld.context.beanstore.AbstractNamingScheme
All Implemented Interfaces:
NamingScheme
Direct Known Subclasses:
ConversationNamingScheme, SimpleNamingScheme

public abstract class AbstractNamingScheme
extends Object
implements NamingScheme


Constructor Summary
AbstractNamingScheme(String delimiter)
          Create a new Prefixer.
 
Method Summary
 boolean accept(String id)
          Determine if this identifier has been prefixed
 Collection<String> deprefix(Collection<String> ids)
           
 String deprefix(String id)
          Remove the prefix from the id
 Collection<String> filterIds(Collection<String> ids)
          Filter a collection of ids, retaining only those correctly prefixed.
protected  String getDelimiter()
           
protected abstract  String getPrefix()
           
 Collection<String> prefix(Collection<String> ids)
           
 String prefix(String id)
          Add the prefix to the id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNamingScheme

public AbstractNamingScheme(String delimiter)
Create a new Prefixer.

Parameters:
prefix - The prefix
delimiter - The delimiter to use between the prefix and the identifier.
Method Detail

accept

public boolean accept(String id)
Description copied from interface: NamingScheme
Determine if this identifier has been prefixed

Specified by:
accept in interface NamingScheme
Parameters:
id - the id to check
Returns:
true if it has been prefixed, false otherwise

deprefix

public String deprefix(String id)
Description copied from interface: NamingScheme
Remove the prefix from the id

Specified by:
deprefix in interface NamingScheme
Parameters:
id - the prefixed id
Returns:
the id without the prefix

prefix

public String prefix(String id)
Description copied from interface: NamingScheme
Add the prefix to the id

Specified by:
prefix in interface NamingScheme
Parameters:
id - the id to prefix
Returns:
the prefixed id

filterIds

public Collection<String> filterIds(Collection<String> ids)
Description copied from interface: NamingScheme
Filter a collection of ids, retaining only those correctly prefixed.

Specified by:
filterIds in interface NamingScheme
Parameters:
ids - the collection of ides to filter

deprefix

public Collection<String> deprefix(Collection<String> ids)
Specified by:
deprefix in interface NamingScheme

prefix

public Collection<String> prefix(Collection<String> ids)
Specified by:
prefix in interface NamingScheme

getPrefix

protected abstract String getPrefix()

getDelimiter

protected String getDelimiter()


Copyright © 2013 Seam Framework. All Rights Reserved.