|
||||||||||
| 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 String |
camelizeName(String name)
Removes any non-Java identifiers from the name and converts it to camelCase. |
|
static String |
canonicalRoleHint(org.codehaus.plexus.component.annotations.Component component)
Returns the canonical role-hint for the given Plexus component. |
|
static String |
canonicalRoleHint(String role,
String hint)
Returns the canonical form of the given Plexus role-hint. |
|
static
|
componentKey(Class<T> role,
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,
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,
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 String canonicalRoleHint(String role,
String hint)
role - The Plexus rolehint - The Plexus hint
public static 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(Class<T> role,
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,
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,
String hint)
ProvisionException detailing the missing Plexus component.
role - The Plexus rolehint - The Plexus hintpublic static String camelizeName(String name)
name - The element name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||