Finder

com.ossuminc.riddl.language.Finder
See theFinder companion object
case class Finder[CV <: ContentValues](root: Container[CV])

The context for finding things within a given com.ossuminc.riddl.language.AST.Container of com.ossuminc.riddl.language.AST.RiddlValue as found in the AST model. This provides the ability to find values in the model by traversing it and looking for the matching condition.

Value parameters

root

The container of RiddlValues to traverse for the sought condition

Attributes

Companion
object
Source
Finder.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Types

The return value for the Finder.findWithParents function

The return value for the Finder.findWithParents function

Attributes

Source
Finder.scala

Value members

Concrete methods

def find(select: CV => Boolean): Seq[CV]

Search the root for a AST.RiddlValue that matches the boolean expression

Search the root for a AST.RiddlValue that matches the boolean expression

Value parameters

select

The boolean expression to search for

Attributes

Returns

A scala.Seq of the matching AST.RiddlValue

Source
Finder.scala

Search the root for a certain kind of AST.RiddlValue and return those

Search the root for a certain kind of AST.RiddlValue and return those

Attributes

Source
Finder.scala

Find definitions that are empty

Find definitions that are empty

Attributes

Returns

A scala.Seq of AST.RiddlValue, along with their parents that are empty

Source
Finder.scala

Find a matching set of AST.RiddlValue but return them with their parents

Find a matching set of AST.RiddlValue but return them with their parents

Value parameters

select

The boolean expression derived from a candidate AST.RiddlValue that selects it to the result set

Attributes

Returns

A Finder#DefWithParents that returns a scala.Seq of two-tuples with the AST.RiddlValue a a scala.Seq of the parents of that value.

Source
Finder.scala

Run a transformation function on the Finder contents.

Run a transformation function on the Finder contents. They type parameter specifies what kind of thing should be found, the select argument provides further refinement of which things of that type should be selected. The transformation function, transformF does the transformation, probably by using the Scala .copy method.

Type parameters

TT

The transform type. This narrows the search to just the contents that have the base type TT.

Value parameters

select

The function to select which values should be operated on. It should return true if the transformation function should be executed on the element passed to it.

transformF

The transformation function to convert one value to another. The returned value will replace the passed value in the Finder's container.

Attributes

Source
Finder.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product