|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.guice.plexus.config.Roles
public final class Roles
Utility methods for dealing with Plexus roles.
Method Summary | ||
---|---|---|
static java.lang.String |
camelizeName(java.lang.String name)
Removes any non-Java identifiers from the name and converts it to camelCase. |
|
static java.lang.String |
canonicalRoleHint(org.codehaus.plexus.component.annotations.Component component)
Returns the canonical role-hint for the given Plexus component. |
|
static java.lang.String |
canonicalRoleHint(java.lang.String role,
java.lang.String hint)
Returns the canonical form of the given Plexus role-hint. |
|
static
|
componentKey(java.lang.Class<T> role,
java.lang.String hint)
Returns the component binding Key for the given Plexus role-hint. |
|
static com.google.inject.Key<?> |
componentKey(org.codehaus.plexus.component.annotations.Component component)
Returns the component binding Key for the given Plexus component. |
|
static
|
componentKey(com.google.inject.TypeLiteral<T> role,
java.lang.String hint)
Returns the component binding Key for the given Plexus role-hint. |
|
static com.google.inject.TypeLiteral<?> |
roleType(org.codehaus.plexus.component.annotations.Requirement requirement,
com.google.inject.TypeLiteral<?> asType)
Deduces the role type based on the given @ Requirement and expected type. |
|
static
|
throwMissingComponentException(com.google.inject.TypeLiteral<T> role,
java.lang.String hint)
Throws a ProvisionException detailing the missing Plexus component. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String canonicalRoleHint(java.lang.String role, java.lang.String hint)
role
- The Plexus rolehint
- The Plexus hint
public static java.lang.String canonicalRoleHint(org.codehaus.plexus.component.annotations.Component component)
component
- The Plexus component
public static com.google.inject.TypeLiteral<?> roleType(org.codehaus.plexus.component.annotations.Requirement requirement, com.google.inject.TypeLiteral<?> asType)
Requirement
and expected type.
requirement
- The Plexus requirementasType
- The expected type
public static com.google.inject.Key<?> componentKey(org.codehaus.plexus.component.annotations.Component component)
Key
for the given Plexus component.
component
- The Plexus component
public static <T> com.google.inject.Key<T> componentKey(java.lang.Class<T> role, java.lang.String hint)
Key
for the given Plexus role-hint.
role
- The Plexus rolehint
- The Plexus hint
public static <T> com.google.inject.Key<T> componentKey(com.google.inject.TypeLiteral<T> role, java.lang.String hint)
Key
for the given Plexus role-hint.
role
- The Plexus rolehint
- The Plexus hint
public static <T> T throwMissingComponentException(com.google.inject.TypeLiteral<T> role, java.lang.String hint)
ProvisionException
detailing the missing Plexus component.
role
- The Plexus rolehint
- The Plexus hintpublic static java.lang.String camelizeName(java.lang.String name)
name
- The element name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |