Class AbstractNamingScheme
- java.lang.Object
-
- org.jboss.weld.contexts.beanstore.AbstractNamingScheme
-
- All Implemented Interfaces:
NamingScheme
- Direct Known Subclasses:
BeanIdentifierIndexNamingScheme
,SimpleNamingScheme
public abstract class AbstractNamingScheme extends Object implements NamingScheme
-
-
Constructor Summary
Constructors Constructor Description AbstractNamingScheme(String delimiter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
accept(String id)
Determine if this identifier has been prefixedorg.jboss.weld.serialization.spi.BeanIdentifier
deprefix(String id)
Remove the prefix from the idCollection<org.jboss.weld.serialization.spi.BeanIdentifier>
deprefix(Collection<String> ids)
Collection<String>
filterIds(Iterator<String> iterator)
Filter ids and retain only those correctly prefixed.protected String
getDelimiter()
protected abstract String
getPrefix()
Collection<String>
prefix(Collection<org.jboss.weld.serialization.spi.BeanIdentifier> ids)
String
prefix(org.jboss.weld.serialization.spi.BeanIdentifier id)
Add the prefix to the id
-
-
-
Constructor Detail
-
AbstractNamingScheme
public AbstractNamingScheme(String delimiter)
- Parameters:
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 interfaceNamingScheme
- Parameters:
id
- the id to check- Returns:
- true if it has been prefixed, false otherwise
-
deprefix
public org.jboss.weld.serialization.spi.BeanIdentifier deprefix(String id)
Description copied from interface:NamingScheme
Remove the prefix from the id- Specified by:
deprefix
in interfaceNamingScheme
- Parameters:
id
- the prefixed id- Returns:
- the id without the prefix
-
prefix
public String prefix(org.jboss.weld.serialization.spi.BeanIdentifier id)
Description copied from interface:NamingScheme
Add the prefix to the id- Specified by:
prefix
in interfaceNamingScheme
- Parameters:
id
- the id to prefix- Returns:
- the prefixed id
-
filterIds
public Collection<String> filterIds(Iterator<String> iterator)
Description copied from interface:NamingScheme
Filter ids and retain only those correctly prefixed.- Specified by:
filterIds
in interfaceNamingScheme
- Parameters:
iterator
- the identifiers to filter
-
deprefix
public Collection<org.jboss.weld.serialization.spi.BeanIdentifier> deprefix(Collection<String> ids)
- Specified by:
deprefix
in interfaceNamingScheme
-
prefix
public Collection<String> prefix(Collection<org.jboss.weld.serialization.spi.BeanIdentifier> ids)
- Specified by:
prefix
in interfaceNamingScheme
-
getPrefix
protected abstract String getPrefix()
-
getDelimiter
protected String getDelimiter()
-
-