Skip navigation links
A B C D E F G H I J L M N O P R S T V W 

A

append(CodeLines) - Method in class io.spine.js.generate.output.CodeLines
Appends another code lines to this code.
append(Snippet) - Method in class io.spine.js.generate.output.CodeLines
Appends the lines of the snippet.
append(String) - Method in class io.spine.js.generate.output.CodeLines
Appends the line of code on the current indent level.
append(CodeLine) - Method in class io.spine.js.generate.output.CodeLines
Appends the code line and indents it to the current indent level.
append(CodeLines) - Method in class io.spine.js.generate.output.FileWriter
Appends the given output to the end of the file.
appendToBody(String) - Method in class io.spine.js.generate.output.snippet.Method.Builder
Appends a line to the body of the method.
appendToBody(CodeLine) - Method in class io.spine.js.generate.output.snippet.Method.Builder
Appends a line to the body of the method.
AppendTypeUrlGetter - Class in io.spine.js.generate
Generates a method to obtain a TypeUrl for each type in a FileSet.
AppendTypeUrlGetter(Directory) - Constructor for class io.spine.js.generate.AppendTypeUrlGetter
 
apply(Project) - Method in class io.spine.js.gradle.ProtoJsPlugin
 

B

build() - Method in interface io.spine.js.generate.field.parser.primitive.PrimitiveParser.Builder
Creates the PrimitiveParser instance corresponding to this builder.
build() - Method in class io.spine.js.generate.output.snippet.MapExportSnippet.Builder
Builds an export statement from the builder.
build() - Method in class io.spine.js.generate.output.snippet.Method.Builder
Obtains the method composed from the builder.

C

CodeLine - Class in io.spine.js.generate.output
A line of a JavaScript code.
CodeLine() - Constructor for class io.spine.js.generate.output.CodeLine
 
CodeLines - Class in io.spine.js.generate.output
The aggregator of the JavaScript output.
CodeLines() - Constructor for class io.spine.js.generate.output.CodeLines
Creates an instance of the JsOutput with the default indentation.
CodeLines(Indent) - Constructor for class io.spine.js.generate.output.CodeLines
Creates an instance of the JsOutput with the custom indentation.
commaSeparated(List<CodeLine>) - Static method in class io.spine.js.generate.output.CodeLines
Merges lines by addition of a comma to each line except the last one.
Comment - Class in io.spine.js.generate.output.snippet
A single-line comment.
configureProtocPlugins(NamedDomainObjectContainer<ExecutableLocator>, Project) - Method in class io.spine.js.gradle.JsProtocConfigurationPlugin
 
content() - Method in class io.spine.js.generate.output.CodeLine
Obtains the value of the line.
content() - Method in class io.spine.js.generate.output.snippet.Comment
 
content() - Method in class io.spine.js.generate.output.snippet.Import
 
content() - Method in class io.spine.js.generate.output.snippet.Return
 
content() - Method in class io.spine.js.generate.output.snippet.VariableDeclaration
 
createFor(FieldToParse, CodeLines) - Static method in class io.spine.js.generate.field.FieldGenerators
Creates a FieldGenerator for the given field.
createFor(Descriptors.FieldDescriptor.Type, CodeLines) - Static method in class io.spine.js.generate.field.parser.primitive.PrimitiveParsers
Creates the new instance of PrimitiveParser for the given field type.
createFor(Directory, LibraryFile) - Static method in class io.spine.js.generate.output.FileWriter
Creates a new instance which will operate on the specified library file located in the specified directory.
createFor(Directory, Descriptors.FileDescriptor) - Static method in class io.spine.js.generate.output.FileWriter
Creates a new instance which will operate on the file pointed by the file descriptor and located in the specified directory.
createFor(Directory) - Static method in class io.spine.js.generate.parse.GenerateKnownTypeParsers
 

D

decreaseDepth() - Method in class io.spine.js.generate.output.CodeLines
Manually decreases the current indent level.
defaultProject(Project) - Method in class io.spine.js.gradle.Extension
 
descriptor() - Method in class io.spine.js.generate.field.FieldToParse
Obtains the descriptor of the field.

E

emptyLine() - Static method in class io.spine.js.generate.output.CodeLine
Obtains an empty code line.
enterBlock(String) - Method in class io.spine.js.generate.output.CodeLines
Enters block with the custom header.
enterElseBlock() - Method in class io.spine.js.generate.output.CodeLines
Closes the current if block and enters the else block.
enterIfBlock(String) - Method in class io.spine.js.generate.output.CodeLines
Enters the if block body.
enterMethod(String, String...) - Method in class io.spine.js.generate.output.CodeLines
Declares JS method and enters its body.
equals(Object) - Method in class io.spine.js.generate.output.CodeLine
 
equals(Object) - Method in class io.spine.js.generate.output.CodeLines
 
exitBlock() - Method in class io.spine.js.generate.output.CodeLines
Exits the if, else or custom block.
exitMethod() - Method in class io.spine.js.generate.output.CodeLines
Exits method declaration.
exitNullCheck() - Method in interface io.spine.js.generate.field.precondition.FieldPrecondition
Generates the code to exit the null check block and return to the upper level.
Extension - Class in io.spine.js.gradle
An extension for the ProtoJsPlugin which allows to obtain the generateJsonParsers task to configure when it will be executed during the build lifecycle.
Extension() - Constructor for class io.spine.js.gradle.Extension
 

F

FieldGenerator - Class in io.spine.js.generate.field
The common base for classes generating the code necessary to parse a specific Protobuf field from JSON.
FieldGenerators - Class in io.spine.js.generate.field
The helper class which provides the FieldGenerator implementation for the given field.
FieldParser - Interface in io.spine.js.generate.field.parser
The generator of the code which parses the field value from the JS object and stores it into some variable.
FieldPrecondition - Interface in io.spine.js.generate.field.precondition
The generator of the code which performs various checks on the proto field value.
FieldPreconditions - Class in io.spine.js.generate.field.precondition
The helper which creates FieldPrecondition instances based on the field type.
FieldToParse - Class in io.spine.js.generate.field
A Protobuf field, which is going to be parsed from a plain JavaScript object to a Protobuf-specific type.
FieldToParse(Descriptors.FieldDescriptor, String, String) - Constructor for class io.spine.js.generate.field.FieldToParse
Creates a new instance.
fileRelativeTo(FileName, FileName) - Static method in class io.spine.js.generate.output.snippet.Import
Obtains an import of a file relative to another file.
fileRelativeToRoot(FileName) - Static method in class io.spine.js.generate.output.snippet.Import
Obtains an import of a file assuming the name is relative to the current directory.
FileWriter - Class in io.spine.js.generate.output
A writer of JavaScript code into a file.
filter(FileSet) - Method in class io.spine.js.generate.GenerationTask
Filters out files that should not processed by the task.

G

generate() - Method in class io.spine.js.generate.JsCodeGenerator
Generate the JavaScript code and store it into the JsOutput.
generatedBySpine() - Static method in class io.spine.js.generate.output.snippet.Comment
Obtains the comment to mark generated code.
generatedFilesBaseDir(Project) - Method in class io.spine.js.gradle.JsProtocConfigurationPlugin
 
GeneratedParser - Class in io.spine.js.generate.parse
The code of a generated parser for a Protobuf message.
generatedRoot() - Method in class io.spine.js.generate.GenerationTask
Obtains the root of the generated Protobuf sources.
generateFor(FileSet) - Method in class io.spine.js.generate.AppendTypeUrlGetter
 
generateFor(FileSet) - Method in class io.spine.js.generate.GenerationTask
Generates code for the Protobuf files.
generateFor(FileSet) - Method in class io.spine.js.generate.imports.ResolveImports
 
generateFor(FileSet) - Method in class io.spine.js.generate.index.GenerateIndexFile
 
generateFor(FileSet) - Method in class io.spine.js.generate.parse.GenerateKnownTypeParsers
 
GenerateIndexFile - Class in io.spine.js.generate.index
The task to generate the index.js for generated Protobuf types.
GenerateIndexFile(Directory) - Constructor for class io.spine.js.generate.index.GenerateIndexFile
 
GenerateKnownTypeParsers - Class in io.spine.js.generate.parse
This class writes the code for parsing of messages generated by Protobuf JS compiler.
generateParsersTask() - Method in class io.spine.js.gradle.Extension
Returns the generateJsonParsers task configured by the ProtoJsPlugin.
GenerationTask - Class in io.spine.js.generate
A code generation task for Protobuf declarations.
GenerationTask(Directory) - Constructor for class io.spine.js.generate.GenerationTask
 
getMainDescriptorSet(Project) - Static method in class io.spine.js.gradle.Extension
 
getMainDescriptorSet(Project) - Method in class io.spine.js.gradle.JsProtocConfigurationPlugin
 
getMainGenProto(Project) - Static method in class io.spine.js.gradle.Extension
 
getTestDescriptorSet(Project) - Static method in class io.spine.js.gradle.Extension
 
getTestDescriptorSet(Project) - Method in class io.spine.js.gradle.JsProtocConfigurationPlugin
 
getTestGenProtoDir(Project) - Static method in class io.spine.js.gradle.Extension
 

H

hashCode() - Method in class io.spine.js.generate.output.CodeLine
 
hashCode() - Method in class io.spine.js.generate.output.CodeLines
 

I

ifNotNull(String) - Method in class io.spine.js.generate.output.CodeLines
Enters the if block checking that the given value is not null.
ifNotNullOrUndefined(String) - Method in class io.spine.js.generate.output.CodeLines
Enters the if block checking that given value is not null or undefined.
ifNotUndefined(String) - Method in class io.spine.js.generate.output.CodeLines
Enters the if block checking that the given value is not undefined.
ifNull(String) - Method in class io.spine.js.generate.output.CodeLines
Enters the if block checking that the given value is null.
Import - Class in io.spine.js.generate.output.snippet
An import of a file or a library.
importedFileExists() - Method in class io.spine.js.generate.imports.ImportStatement
Tells whether the imported file is present on a file system.
importedFilePath() - Method in class io.spine.js.generate.imports.ImportStatement
Obtains the absolute path to the imported file.
ImportStatement - Class in io.spine.js.generate.imports
An import statement extracted from a source file.
ImportStatement(String, File) - Constructor for class io.spine.js.generate.imports.ImportStatement
Creates a new instance.
increaseDepth() - Method in class io.spine.js.generate.output.CodeLines
Manually increases the current indent level.
initialized(String, String) - Static method in class io.spine.js.generate.output.snippet.VariableDeclaration
Obtains the declaration with the specified name, which is initialized to the value.
io.spine.js.generate - package io.spine.js.generate
The classes generating and writing the JavaScript code.
io.spine.js.generate.field - package io.spine.js.generate.field
The classes which generate JS code for parsing the separate proto fields from JSON.
io.spine.js.generate.field.parser - package io.spine.js.generate.field.parser
The classes which generate the JavaScript code related to parsing proto fields from JSON.
io.spine.js.generate.field.parser.primitive - package io.spine.js.generate.field.parser.primitive
The classes which generate the JS code related to parsing the proto primitive types from their JSON representation.
io.spine.js.generate.field.precondition - package io.spine.js.generate.field.precondition
The classes which generate JS code performing various proto field value checks.
io.spine.js.generate.imports - package io.spine.js.generate.imports
Classes for resolving JS imports.
io.spine.js.generate.index - package io.spine.js.generate.index
The package contains classes performing writing of the index file for the generated Protobuf types.
io.spine.js.generate.output - package io.spine.js.generate.output
The package contains classes performing writing of JavaScript code.
io.spine.js.generate.output.snippet - package io.spine.js.generate.output.snippet
The package contains standard elements of JavaScript code such as a statement or a declaration.
io.spine.js.generate.parse - package io.spine.js.generate.parse
The classes which generate JavaScript code for parsing of Protobuf messages.
io.spine.js.gradle - package io.spine.js.gradle
The Gradle plugin which adds the JSON-parsing code for the messages generated by Protobuf JS compiler.

J

JsCodeGenerator - Class in io.spine.js.generate
The common base for JavaScript code generators which operate on the CodeLines.
JsCodeGenerator(CodeLines) - Constructor for class io.spine.js.generate.JsCodeGenerator
 
JsFile - Class in io.spine.js.generate.imports
A JavaScript file present on a file system.
JsFile(Path) - Constructor for class io.spine.js.generate.imports.JsFile
 
JsFile.ProcessImport - Interface in io.spine.js.generate.imports
A function processing an import statement.
jsOutput() - Method in class io.spine.js.generate.JsCodeGenerator
The JsOutput which accumulates all the generated code.
JsProtocConfigurationPlugin - Class in io.spine.js.gradle
A Gradle plugin that performs additional protoc configurations relevant for JavaScript projects.
JsProtocConfigurationPlugin() - Constructor for class io.spine.js.gradle.JsProtocConfigurationPlugin
 

L

library(String) - Static method in class io.spine.js.generate.output.snippet.Import
Obtains an import of a library.

M

mainDescriptorFile(Project) - Method in class io.spine.js.gradle.ProtoJsPlugin
 
mainDescriptorSetPath - Variable in class io.spine.js.gradle.Extension
The absolute path to the main Protobuf descriptor set file.
mainGenProtoDir - Variable in class io.spine.js.gradle.Extension
The absolute path to the main Protobufs compiled to JavaScript.
MapExportSnippet - Class in io.spine.js.generate.output.snippet
A snippet representing an export of an initialized map.
MapExportSnippet.Builder - Class in io.spine.js.generate.output.snippet
 
messageVariable() - Method in class io.spine.js.generate.field.FieldToParse
Obtains the name of a variable to set the field at.
Method - Class in io.spine.js.generate.output.snippet
The declaration of a method in JavaScript code.
Method.Builder - Class in io.spine.js.generate.output.snippet
The builder of a method.
modules - Variable in class io.spine.js.gradle.Extension
Names of JavaScript modules and directories they provide.
modules(Project) - Static method in class io.spine.js.gradle.Extension
 

N

namedAs(String) - Method in class io.spine.js.generate.output.snippet.Import
Obtains the named version of the import.
newBuilder(String) - Static method in class io.spine.js.generate.output.snippet.MapExportSnippet
Obtains a builder for a map export.
newBuilder(MethodReference) - Static method in class io.spine.js.generate.output.snippet.Method
Obtains the builder to compose a method.
newInstance(String, TypeName) - Static method in class io.spine.js.generate.output.snippet.VariableDeclaration
Obtains the declaration of a variable initialized by instantiation of the type.
nullReference() - Static method in class io.spine.js.generate.output.snippet.Return
Composes a statement returning null.

O

of(String) - Static method in class io.spine.js.generate.output.CodeLine
Obtains a code line with the specified content.
of(String) - Static method in class io.spine.js.generate.output.snippet.Comment
Obtains the comment from the specified text.

P

parseIntoVariable(String, String) - Method in interface io.spine.js.generate.field.parser.FieldParser
Generates the code which parses the field value from some object and assigns it to the variable.
parseIntoVariable(String, String) - Method in interface io.spine.js.generate.field.parser.primitive.PrimitiveParser
Generates the code required to parse the primitive value and assign it to the variable.
parseMethodCall(String, String) - Static method in class io.spine.js.generate.parse.GeneratedParser
Obtains the string representing a call to a method parsing an object into a message.
parserFor(Descriptors.FieldDescriptor, CodeLines) - Static method in interface io.spine.js.generate.field.parser.FieldParser
Creates a FieldParser for the given field.
path() - Method in class io.spine.js.generate.imports.ImportStatement
Obtains the file reference used in this import.
performFor(FileSet) - Method in class io.spine.js.generate.GenerationTask
Generates code for the specified file set.
performNullCheck(String, String) - Method in interface io.spine.js.generate.field.precondition.FieldPrecondition
Generates the code which checks the given field value for null.
preconditionFor(Descriptors.FieldDescriptor, CodeLines) - Static method in class io.spine.js.generate.field.precondition.FieldPreconditions
Creates a FieldPrecondition for the given field.
PrimitiveParser - Interface in io.spine.js.generate.field.parser.primitive
The generator of the JS code parsing some primitive value from its JSON representation.
PrimitiveParser.Builder<B extends PrimitiveParser.Builder<B>> - Interface in io.spine.js.generate.field.parser.primitive
The generic builder for the classes-descendants.
PrimitiveParsers - Class in io.spine.js.generate.field.parser.primitive
The helper class which creates a PrimitiveParser based on the passed field type.
processImports(Predicate<ImportStatement>, JsFile.ProcessImport) - Method in class io.spine.js.generate.imports.JsFile
Processes import statements in this file.
ProtoJsPlugin - Class in io.spine.js.gradle
The Gradle plugin which performs additional code generation for Protobuf types.
ProtoJsPlugin() - Constructor for class io.spine.js.gradle.ProtoJsPlugin
 

R

replacePath(CharSequence) - Method in class io.spine.js.generate.imports.ImportStatement
Obtains a new instance with the updated path in the import statement.
ResolveImports - Class in io.spine.js.generate.imports
A task to resolve imports in generated files.
ResolveImports(Directory, Collection<ExternalModule>) - Constructor for class io.spine.js.generate.imports.ResolveImports
 
Return - Class in io.spine.js.generate.output.snippet
A code line representing a return statement.

S

setJsOutput(CodeLines) - Method in interface io.spine.js.generate.field.parser.primitive.PrimitiveParser.Builder
Sets the JsOutput which will accumulate all the generated code.
Snippet - Interface in io.spine.js.generate
A snippet of the code.
sourceDirectory() - Method in class io.spine.js.generate.imports.ImportStatement
Obtains the path of the directory with the file containing this import.
stringLiteral(String) - Static method in class io.spine.js.generate.output.snippet.Return
Composes a statement returning a string literal.

T

targetTypes(Descriptors.FileDescriptor) - Static method in class io.spine.js.generate.parse.GenerateKnownTypeParsers
Obtains types, which require parsers to be generated.
testDescriptorFile(Project) - Method in class io.spine.js.gradle.ProtoJsPlugin
 
testDescriptorSetPath - Variable in class io.spine.js.gradle.Extension
The absolute path to the test Protobuf descriptor set file.
testGenProtoDir - Variable in class io.spine.js.gradle.Extension
The absolute path to the test Protobufs compiled to JavaScript.
toDefault() - Method in class io.spine.js.generate.output.snippet.Import
Converts the import to the default import.
toString() - Method in class io.spine.js.generate.output.CodeLine
 
toString() - Method in class io.spine.js.generate.output.CodeLines
Concatenates all the code lines with the correct indentation and line separator.
TYPE_PARSERS_IMPORT_NAME - Static variable in class io.spine.js.generate.parse.GenerateKnownTypeParsers
The name of the import of parsers registry.

V

value() - Method in class io.spine.js.generate.field.FieldToParse
Obtains the reference to the field value on the source object.
value() - Method in class io.spine.js.generate.output.snippet.MapExportSnippet
 
value() - Method in class io.spine.js.generate.output.snippet.Method
 
value(Object) - Static method in class io.spine.js.generate.output.snippet.Return
Composes a statement returning the value.
value() - Method in class io.spine.js.generate.parse.GeneratedParser
 
value() - Method in interface io.spine.js.generate.Snippet
Obtains code lines representing this snippet.
VariableDeclaration - Class in io.spine.js.generate.output.snippet
A declaration of a variable.

W

withEntries(List<Map.Entry<String, T>>) - Method in class io.spine.js.generate.output.snippet.MapExportSnippet.Builder
Adds several entries.
withEntry(String, Object) - Method in class io.spine.js.generate.output.snippet.MapExportSnippet.Builder
Adds an entry with the string literal key.
withParameters(String...) - Method in class io.spine.js.generate.output.snippet.Method.Builder
Specifies the parameter names of the method.
write(CodeLines) - Method in class io.spine.js.generate.output.FileWriter
Writes the given output to the file.
A B C D E F G H I J L M N O P R S T V W 
Skip navigation links