public class DefaultEnforcementRuleHelper extends Object implements EnforcerRuleHelper
| Constructor and Description |
|---|
DefaultEnforcementRuleHelper(org.apache.maven.execution.MavenSession session,
org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator,
org.apache.maven.plugin.logging.Log log,
org.codehaus.plexus.PlexusContainer container)
Instantiates a new default enforcement rule helper.
|
| Modifier and Type | Method and Description |
|---|---|
File |
alignToBaseDirectory(File theFile) |
Object |
evaluate(String theExpression) |
<T> T |
getComponent(Class<T> clazz)
Gets the component.
|
<T> T |
getComponent(Class<T> clazz,
String roleHint)
Gets the component.
|
Object |
getComponent(String theComponentKey)
Gets the component.
|
Object |
getComponent(String theRole,
String theRoleHint)
Gets the component.
|
List<Object> |
getComponentList(String theRole)
Gets the component list.
|
Map<String,Object> |
getComponentMap(String theRole)
Gets the component map.
|
org.codehaus.plexus.PlexusContainer |
getContainer()
Gets the container.
|
org.apache.maven.plugin.logging.Log |
getLog()
Gets the log.
|
public DefaultEnforcementRuleHelper(org.apache.maven.execution.MavenSession session, org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator evaluator, org.apache.maven.plugin.logging.Log log, org.codehaus.plexus.PlexusContainer container)
session - the sessionevaluator - the evaluatorlog - the logcontainer - the containerpublic org.apache.maven.plugin.logging.Log getLog()
EnforcerRuleHelpergetLog in interface EnforcerRuleHelperpublic File alignToBaseDirectory(File theFile)
alignToBaseDirectory in interface org.codehaus.plexus.component.configurator.expression.ExpressionEvaluatorpublic Object evaluate(String theExpression) throws org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException
evaluate in interface org.codehaus.plexus.component.configurator.expression.ExpressionEvaluatororg.codehaus.plexus.component.configurator.expression.ExpressionEvaluationExceptionpublic <T> T getComponent(Class<T> clazz) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelpergetComponent in interface EnforcerRuleHelperclazz - the clazzorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionpublic Object getComponent(String theComponentKey) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelpergetComponent in interface EnforcerRuleHelpertheComponentKey - the component keyorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionpublic Object getComponent(String theRole, String theRoleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelpergetComponent in interface EnforcerRuleHelpertheRole - the roletheRoleHint - the role hintorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionpublic List<Object> getComponentList(String theRole) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelpergetComponentList in interface EnforcerRuleHelpertheRole - the roleorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionpublic Map<String,Object> getComponentMap(String theRole) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelpergetComponentMap in interface EnforcerRuleHelpertheRole - the roleorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionpublic <T> T getComponent(Class<T> clazz, String roleHint) throws org.codehaus.plexus.component.repository.exception.ComponentLookupException
EnforcerRuleHelpergetComponent in interface EnforcerRuleHelperclazz - the clazzroleHint - the role hintorg.codehaus.plexus.component.repository.exception.ComponentLookupException - the component lookup exceptionpublic org.codehaus.plexus.PlexusContainer getContainer()
EnforcerRuleHelpergetContainer in interface EnforcerRuleHelperCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.