public class JavaScriptStyle extends java.lang.Object implements ScriptStyle
Constructor and Description |
---|
JavaScriptStyle()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBlockCommentEndDelimiter()
Returns the character sequence used in the language to end a block comment.
|
java.lang.String |
getBlockCommentStartDelimiter()
Returns the character sequence used in the language to start a block comment.
|
java.lang.String |
getEscapeQuoteDelimiter(java.lang.String quoteDelimiter)
Returns the string used to print the given quote delimiter inside a quote without stopping the quote
(if quote delimiter is e.g.
|
java.lang.String[] |
getFileNameExtensions()
Returns an array of all file name extensions typically associated with scripts for which this style is made.
|
java.lang.String[] |
getScriptLanguageNames()
Should return a list of the names of all scripting language implemented by the respective implementation (e.g.
|
java.lang.String |
getScriptStyleID()
Should return a unique ID with which the script style implementation can be identified.
|
java.lang.String |
getSingleLineDelimiter()
Returns the character sequence used in the language to start a single line comment.
|
boolean |
isDelimiter(java.lang.String character)
Returns true if the given character delimits two words/commands (e.g.
|
boolean |
isKeyword(java.lang.String token)
Returns true if the given token is a language specific keyword (e.g.
|
boolean |
isQuoteDelimiter(java.lang.String character)
Returns true if the given character can be used to delimit a quote (e.g.
|
boolean |
supportsFileNameExtension(java.lang.String extension)
Returns true if the given file name extension is typically associated with scripts for which this style is made.
|
public boolean isDelimiter(java.lang.String character)
ScriptStyle
isDelimiter
in interface ScriptStyle
character
- The character for which it should be queried if it is a delimiter.public boolean isQuoteDelimiter(java.lang.String character)
ScriptStyle
isQuoteDelimiter
in interface ScriptStyle
character
- The character for which it should be queried if it is a quote delimiter.public boolean isKeyword(java.lang.String token)
ScriptStyle
isKeyword
in interface ScriptStyle
public java.lang.String getBlockCommentStartDelimiter()
ScriptStyle
getBlockCommentStartDelimiter
in interface ScriptStyle
public java.lang.String getBlockCommentEndDelimiter()
ScriptStyle
getBlockCommentEndDelimiter
in interface ScriptStyle
public java.lang.String getSingleLineDelimiter()
ScriptStyle
getSingleLineDelimiter
in interface ScriptStyle
public java.lang.String getEscapeQuoteDelimiter(java.lang.String quoteDelimiter)
ScriptStyle
getEscapeQuoteDelimiter
in interface ScriptStyle
quoteDelimiter
- The escaped version of the quote delimiter.public java.lang.String[] getFileNameExtensions()
ScriptStyle
getFileNameExtensions
in interface ScriptStyle
public boolean supportsFileNameExtension(java.lang.String extension)
ScriptStyle
supportsFileNameExtension
in interface ScriptStyle
public java.lang.String getScriptStyleID()
ScriptStyle
getScriptStyleID
in interface ScriptStyle
public java.lang.String[] getScriptLanguageNames()
ScriptStyle
getScriptLanguageNames
in interface ScriptStyle