org.codehaus.gmaven.feature.support
Class FeatureSupport

java.lang.Object
  extended by org.codehaus.gmaven.feature.support.FeatureSupport
All Implemented Interfaces:
Feature
Direct Known Subclasses:
ClassCompilerFeature, ClassCompilerFeature, ClassCompilerFeature, ClassFactoryFeature, ClassFactoryFeature, ClassFactoryFeature, ConsoleFeature, ConsoleFeature, ConsoleFeature, ScriptExecutorFeature, ScriptExecutorFeature, ScriptExecutorFeature, ShellFeature, ShellFeature, ShellFeature, StubCompilerFeature, StubCompilerFeature, StubCompilerFeature, TraceSanitizerFeature, TraceSanitizerFeature, TraceSanitizerFeature

public abstract class FeatureSupport
extends Object
implements Feature

Provides support for Feature implementations.

Version:
$Id: FeatureSupport.java 76 2009-12-05 12:04:30Z user57 $
Author:
Jason Dillon

Field Summary
protected  Configuration config
           
protected  String key
           
protected  org.slf4j.Logger log
           
protected  Provider provider
           
protected  boolean supported
           
 
Constructor Summary
protected FeatureSupport(String key)
           
protected FeatureSupport(String key, boolean supported)
           
 
Method Summary
static String asString(Feature feature)
           
 Configuration config()
           
 Component create()
           
 Component create(Configuration context)
           
protected abstract  Component doCreate()
           
 int hashCode()
           
 String key()
           
 String name()
           
protected  Provider provider()
           
 void require()
           
 boolean supported()
           
 String toString()
           
 
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

supported

protected final boolean supported

provider

protected Provider provider
Constructor Detail

FeatureSupport

protected FeatureSupport(String key,
                         boolean supported)

FeatureSupport

protected FeatureSupport(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 Feature

name

public String name()
Specified by:
name in interface Feature

supported

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

require

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

config

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

create

public Component create(Configuration context)
                 throws Exception
Specified by:
create in interface Feature
Throws:
Exception

create

public Component create()
                 throws Exception
Specified by:
create in interface Feature
Throws:
Exception

doCreate

protected abstract Component doCreate()
                               throws Exception
Throws:
Exception

provider

protected Provider provider()

asString

public static String asString(Feature feature)


Copyright © 2006-2012 Codehaus. All Rights Reserved.