org.scijava.script
Interface ScriptHeaderService

All Superinterfaces:
Comparable<Prioritized>, Contextual, Disposable, HandlerService<ScriptLanguage,ScriptHeader>, HasPluginInfo, Prioritized, PTService<ScriptHeader>, RichPlugin, SciJavaPlugin, Service, SingletonService<ScriptHeader>, Typed<ScriptLanguage>, TypedService<ScriptLanguage,ScriptHeader>
All Known Implementing Classes:
DefaultScriptHeaderService

public interface ScriptHeaderService
extends HandlerService<ScriptLanguage,ScriptHeader>

Interface for a HandlerService capable of mapping ScriptLanguages to ScriptHeaders.

NB: although individual/highest priority handlers can be queried as normal via a HandlerService, the getHeader(ScriptLanguage) method will combine the headers for all available ScriptHeaders for a given ScriptLanguage.

Author:
Mark Hiner

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.
 
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
create, getPlugins, getPluginService, getPluginType
 
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
 
Methods inherited from interface org.scijava.Typed
getType
 

Method Detail

getHeader

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.

Parameters:
language - - Language to look up
Returns:
The combined header text to insert at the top of a script.


Copyright © 2009–2015 SciJava. All rights reserved.