org.apache.maven.dotnet.executable.impl
Class CapabilityMatcherImpl

java.lang.Object
  extended by org.apache.maven.dotnet.executable.impl.CapabilityMatcherImpl
All Implemented Interfaces:
CapabilityMatcher, org.codehaus.plexus.logging.LogEnabled

public class CapabilityMatcherImpl
extends java.lang.Object
implements CapabilityMatcher, org.codehaus.plexus.logging.LogEnabled

Provides an implementation of the CapabilityMatcher interface.

Author:
Shane Isbell

Constructor Summary
CapabilityMatcherImpl()
           
 
Method Summary
 void enableLogging(org.codehaus.plexus.logging.Logger logger)
           
 CompilerCapability matchCompilerCapabilityFor(CompilerRequirement compilerRequirement)
          Returns compiler capability for the specified requirement.
 CompilerCapability matchCompilerCapabilityFor(CompilerRequirement compilerRequirement, java.util.List<ExecutableMatchPolicy> matchPolicies)
          Returns compiler capability for the specified requirement and match policies.
 ExecutableCapability matchExecutableCapabilityFor(ExecutableRequirement executableRequirement)
          Returns the PlatformCapability for the given vendor and language.
 ExecutableCapability matchExecutableCapabilityFor(ExecutableRequirement executableRequirement, java.util.List<ExecutableMatchPolicy> matchPolicies)
          Returns the PlatformCapability for the given vendor, language and match policies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CapabilityMatcherImpl

public CapabilityMatcherImpl()
Method Detail

enableLogging

public void enableLogging(org.codehaus.plexus.logging.Logger logger)
Specified by:
enableLogging in interface org.codehaus.plexus.logging.LogEnabled

matchCompilerCapabilityFor

public CompilerCapability matchCompilerCapabilityFor(CompilerRequirement compilerRequirement,
                                                     java.util.List<ExecutableMatchPolicy> matchPolicies)
                                              throws PlatformUnsupportedException
Description copied from interface: CapabilityMatcher
Returns compiler capability for the specified requirement and match policies. Use this to customize matches beyond the standard vendor/OS/profile/language/frameworkVersion parameters.

Specified by:
matchCompilerCapabilityFor in interface CapabilityMatcher
Parameters:
compilerRequirement - requirements for the compiler
matchPolicies - the policies used to specialize the match
Returns:
compiler capability for the specified requirement and match policies.
Throws:
PlatformUnsupportedException - if the requirements cannot be met by the platform

matchCompilerCapabilityFor

public CompilerCapability matchCompilerCapabilityFor(CompilerRequirement compilerRequirement)
                                              throws PlatformUnsupportedException
Description copied from interface: CapabilityMatcher
Returns compiler capability for the specified requirement. This method looks at the requirement of the user and returns a compiler that is capable of meeting those requirements.

Specified by:
matchCompilerCapabilityFor in interface CapabilityMatcher
Parameters:
compilerRequirement - the requirements for the compiler
Returns:
compiler capability for the specified requirement.
Throws:
PlatformUnsupportedException - if the requirements cannot be met by the platform

matchExecutableCapabilityFor

public ExecutableCapability matchExecutableCapabilityFor(ExecutableRequirement executableRequirement)
                                                  throws PlatformUnsupportedException
Returns the PlatformCapability for the given vendor and language.

Specified by:
matchExecutableCapabilityFor in interface CapabilityMatcher
Parameters:
executableRequirement -
Returns:
the PlatformCapability for the given vendor and language.
Throws:
PlatformUnsupportedException - if the vendor and language (as specified in plugin-compilers.xml) are not available for the invoking operating system.

matchExecutableCapabilityFor

public ExecutableCapability matchExecutableCapabilityFor(ExecutableRequirement executableRequirement,
                                                         java.util.List<ExecutableMatchPolicy> matchPolicies)
                                                  throws PlatformUnsupportedException
Returns the PlatformCapability for the given vendor, language and match policies. For this query to return a platform capability ALL must match (general AND condition). The matchPolicies allow the developer to customize the query results by any of the PlatformCapability properties.

Specified by:
matchExecutableCapabilityFor in interface CapabilityMatcher
Parameters:
executableRequirement -
matchPolicies - policies for matching capabilities
Returns:
the PlatformCapability for the given vendor, language and match policies.
Throws:
PlatformUnsupportedException - if the vendor and language (as specified in plugin-compilers.xml) are not available for the invoking operating system and/or any of the match policies fail.


Copyright © 2007 NMaven. All Rights Reserved.