org.codehaus.gmaven.feature.support
Class ProviderSupport

java.lang.Object
  extended by org.codehaus.gmaven.feature.support.ProviderSupport
All Implemented Interfaces:
Provider
Direct Known Subclasses:
ProviderImpl, ProviderImpl, ProviderImpl

public abstract class ProviderSupport
extends Object
implements Provider

Provides support for Provider implementations.

Version:
$Id: ProviderSupport.java 9 2009-07-16 09:22:08Z user57 $
Author:
Jason Dillon

Field Summary
protected  Configuration config
           
protected  Map features
           
protected  String key
           
protected  org.slf4j.Logger log
           
protected  Boolean supported
           
protected  Version version
           
 
Constructor Summary
protected ProviderSupport(String key)
           
protected ProviderSupport(String key, Configuration config)
           
 
Method Summary
static String asString(Provider provider)
           
 Configuration config()
           
protected abstract  Map detectFeatures()
           
protected  boolean detectSupported()
           
protected abstract  Version detectVersion()
           
 Feature feature(Class key)
           
 Feature feature(String key)
           
 Collection features()
           
 int hashCode()
           
 String key()
           
 String name()
           
 void require()
           
 boolean supported()
           
 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 String key

config

protected final Configuration config

version

protected Version version

supported

protected Boolean supported

features

protected Map features
Constructor Detail

ProviderSupport

protected ProviderSupport(String key,
                          Configuration config)

ProviderSupport

protected ProviderSupport(String key)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

key

public String key()
Specified by:
key in interface Provider

name

public 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 Map detectFeatures()

features

public Collection features()
Specified by:
features in interface Provider

feature

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

feature

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

asString

public static String asString(Provider provider)


Copyright © 2006-2012 Codehaus. All Rights Reserved.