BowlerKernel
Public Member Functions | Static Private Attributes | List of all members
com.neuronrobotics.bowlerstudio.scripting.JsonRunner Class Reference
Inheritance diagram for com.neuronrobotics.bowlerstudio.scripting.JsonRunner:
Inheritance graph
[legend]
Collaboration diagram for com.neuronrobotics.bowlerstudio.scripting.JsonRunner:
Collaboration graph
[legend]

Public Member Functions

Object inlineScriptRun (File code, ArrayList< Object > args) throws Exception
 
Object inlineScriptRun (String code, ArrayList< Object > args) throws Exception
 
String getShellType ()
 
boolean getIsTextFile ()
 
String getDefaultContents ()
 
ArrayList< String > getFileExtenetion ()
 
- Public Member Functions inherited from com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage
default boolean isSupportedFileExtenetion (String filename)
 
default String getDefaultContents (String gitURL, String fileSlug)
 

Static Private Attributes

static Type TT_mapStringString
 
static Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create()
 

Detailed Description

Definition at line 17 of file JsonRunner.java.

Member Function Documentation

◆ getDefaultContents()

String com.neuronrobotics.bowlerstudio.scripting.JsonRunner.getDefaultContents ( )

Get the contents of an empty file

Returns

Implements com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage.

Definition at line 58 of file JsonRunner.java.

◆ getFileExtenetion()

ArrayList<String> com.neuronrobotics.bowlerstudio.scripting.JsonRunner.getFileExtenetion ( )

Returns the list of supported file extentions Convention is to provide just the leters that make up the file extention

Implements com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage.

Definition at line 63 of file JsonRunner.java.

◆ getIsTextFile()

boolean com.neuronrobotics.bowlerstudio.scripting.JsonRunner.getIsTextFile ( )

This function returns if this is a binary file or a text file

Returns
true if the file is a text file.

Implements com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage.

Definition at line 49 of file JsonRunner.java.

◆ getShellType()

String com.neuronrobotics.bowlerstudio.scripting.JsonRunner.getShellType ( )

Returns the HashMap key for this language

Implements com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage.

Definition at line 44 of file JsonRunner.java.

◆ inlineScriptRun() [1/2]

Object com.neuronrobotics.bowlerstudio.scripting.JsonRunner.inlineScriptRun ( File  code,
ArrayList< Object >  args 
) throws Exception

This interface is for adding additional language support.

Parameters
codefile content of the code to be executed
argsthe incoming arguments as a list of objects
Returns
the objects returned form the code that ran

Implements com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage.

Definition at line 27 of file JsonRunner.java.

◆ inlineScriptRun() [2/2]

Object com.neuronrobotics.bowlerstudio.scripting.JsonRunner.inlineScriptRun ( String  code,
ArrayList< Object >  args 
) throws Exception

This interface is for adding additional language support.

Parameters
codethe text content of the code to be executed
argsthe incoming arguments as a list of objects
Returns
the objects returned form the code that ran

Implements com.neuronrobotics.bowlerstudio.scripting.IScriptingLanguage.

Definition at line 36 of file JsonRunner.java.

References com.neuronrobotics.bowlerstudio.scripting.JsonRunner.gson, and com.neuronrobotics.bowlerstudio.scripting.JsonRunner.TT_mapStringString.

Member Data Documentation

◆ gson

Gson com.neuronrobotics.bowlerstudio.scripting.JsonRunner.gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create()
staticprivate

◆ TT_mapStringString

Type com.neuronrobotics.bowlerstudio.scripting.JsonRunner.TT_mapStringString
staticprivate
Initial value:
= new TypeToken<HashMap<String, HashMap<String, Object>>>() {
}.getType()

Definition at line 21 of file JsonRunner.java.

Referenced by com.neuronrobotics.bowlerstudio.scripting.JsonRunner.inlineScriptRun().


The documentation for this class was generated from the following file: