org.scijava.script
Class DefaultScriptHeaderService

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.service.AbstractService
              extended by org.scijava.plugin.AbstractPTService<PT>
                  extended by org.scijava.plugin.AbstractSingletonService<PT>
                      extended by org.scijava.plugin.AbstractHandlerService<ScriptLanguage,ScriptHeader>
                          extended by org.scijava.script.DefaultScriptHeaderService
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, Disposable, HandlerService<ScriptLanguage,ScriptHeader>, HasPluginInfo, PTService<ScriptHeader>, RichPlugin, SciJavaPlugin, SingletonService<ScriptHeader>, TypedService<ScriptLanguage,ScriptHeader>, Prioritized, ScriptHeaderService, Service, Typed<ScriptLanguage>

public class DefaultScriptHeaderService
extends AbstractHandlerService<ScriptLanguage,ScriptHeader>
implements ScriptHeaderService

Default ScriptHeaderService implementation.

Author:
Mark Hiner

Constructor Summary
DefaultScriptHeaderService()
           
 
Method Summary
 String getHeader(ScriptLanguage language)
          Searches for all ScriptHeaders capable of handling the given ScriptLanguage and combines the result of their ScriptHeader.getHeader() output to a single string.
 Class<ScriptHeader> getPluginType()
          Gets the type of plugins managed by this service.
 Class<ScriptLanguage> getType()
          Gets the type associated with the object.
 
Methods inherited from class org.scijava.plugin.AbstractHandlerService
getHandler, supports
 
Methods inherited from class org.scijava.plugin.AbstractSingletonService
filterInstances, getInstance, getInstances, initialize
 
Methods inherited from class org.scijava.plugin.AbstractPTService
getPlugins, getPluginService
 
Methods inherited from class org.scijava.service.AbstractService
dispose, getContext, registerEventHandlers, setContext, toString
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority
 
Methods inherited from class org.scijava.AbstractContextual
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.plugin.HandlerService
getHandler, getInstances, supports
 
Methods inherited from interface org.scijava.plugin.SingletonService
getInstance
 
Methods inherited from interface org.scijava.plugin.PTService
getPlugins, getPluginService
 
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 

Constructor Detail

DefaultScriptHeaderService

public DefaultScriptHeaderService()
Method Detail

getHeader

public String getHeader(ScriptLanguage language)
Description copied from interface: ScriptHeaderService
Searches for all ScriptHeaders capable of handling the given ScriptLanguage and combines the result of their ScriptHeader.getHeader() output to a single string.

Specified by:
getHeader in interface ScriptHeaderService
Parameters:
language - - Language to look up
Returns:
The combined header text to insert at the top of a script.

getPluginType

public Class<ScriptHeader> getPluginType()
Description copied from interface: PTService
Gets the type of plugins managed by this service.

Specified by:
getPluginType in interface PTService<ScriptHeader>

getType

public Class<ScriptLanguage> getType()
Description copied from interface: Typed
Gets the type associated with the object.

Specified by:
getType in interface Typed<ScriptLanguage>


Copyright © 2009–2014 SciJava. All rights reserved.