org.codehaus.groovy.maven.feature.support
Class ProviderSupport

java.lang.Object
  extended by org.codehaus.groovy.maven.feature.support.ProviderSupport
All Implemented Interfaces:
Provider
Direct Known Subclasses:
GroovyRuntime_v10, GroovyRuntime_v15, GroovyRuntime_v16

public abstract class ProviderSupport
extends java.lang.Object
implements Provider

Provides support for Provider implementations.

Version:
$Id: ProviderSupport.java 13181 2008-08-10 14:05:55Z user57 $
Author:
Jason Dillon

Field Summary
protected  Configuration config
           
protected  java.util.Map features
           
protected  java.lang.String key
           
protected  org.slf4j.Logger log
           
protected  java.lang.Boolean supported
           
protected  Version version
           
 
Constructor Summary
protected ProviderSupport(java.lang.String key)
           
protected ProviderSupport(java.lang.String key, Configuration config)
           
 
Method Summary
static java.lang.String asString(Provider provider)
           
 Configuration config()
           
protected abstract  java.util.Map detectFeatures()
           
protected  boolean detectSupported()
           
protected abstract  Version detectVersion()
           
 Feature feature(java.lang.Class key)
           
 Feature feature(java.lang.String key)
           
 java.util.Collection features()
           
 int hashCode()
           
 java.lang.String key()
           
 java.lang.String name()
           
 void require()
           
 boolean supported()
           
 java.lang.String toString()
           
 Version version()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected final org.slf4j.Logger log

key

protected final java.lang.String key

config

protected final Configuration config

version

protected Version version

supported

protected java.lang.Boolean supported

features

protected java.util.Map features
Constructor Detail

ProviderSupport

protected ProviderSupport(java.lang.String key,
                          Configuration config)

ProviderSupport

protected ProviderSupport(java.lang.String key)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

key

public java.lang.String key()
Specified by:
key in interface Provider

name

public java.lang.String name()
Specified by:
name in interface Provider

detectVersion

protected abstract Version detectVersion()

version

public Version version()
Specified by:
version in interface Provider

detectSupported

protected boolean detectSupported()

supported

public boolean supported()
Specified by:
supported in interface Provider

require

public void require()
Specified by:
require in interface Provider

config

public Configuration config()
Specified by:
config in interface Provider

detectFeatures

protected abstract java.util.Map detectFeatures()

features

public java.util.Collection features()
Specified by:
features in interface Provider

feature

public Feature feature(java.lang.String key)
Specified by:
feature in interface Provider

feature

public Feature feature(java.lang.Class key)
Specified by:
feature in interface Provider

asString

public static java.lang.String asString(Provider provider)


Copyright © 2006-2008 Codehaus. All Rights Reserved.