Packages

  • package root
    Definition Classes
    root
  • package sigma

    The following implicit values are used as type descriptors of all the predefined Sigma types.

    The following implicit values are used as type descriptors of all the predefined Sigma types.

    Definition Classes
    root
    See also

    RType class

  • package ast
    Definition Classes
    sigma
  • package crypto
    Definition Classes
    sigma
  • package data

    Contains cores definitions which serves as a basis for sigma package implementations.

    Contains cores definitions which serves as a basis for sigma package implementations.

    Definition Classes
    sigma
  • package eval
    Definition Classes
    sigma
  • package exceptions
    Definition Classes
    sigma
  • package impl
    Definition Classes
    sigma
  • package interpreter
    Definition Classes
    sigma
  • package kiama

    Kiama is a Scala library for language processing.

    Kiama is a Scala library for language processing. It is a project of the Programming Languages Research Group at Macquarie University. For full project details see the web site http://github.com/inkytonik/kiama.

    Kiama's main components address tree decoration via attribute grammars (package attribution), tree transformation via strategic term rewriting (package rewriting), dynamic semantics (package machine) and pretty-printing (package output).

    The util package contains support modules for parsing, input/output, read-eval-print loops (REPLs) and pattern matching.

    The examples package (available as part of the Kiama tests) contains many examples of using Kiama to solve small to medium language processing problems.

    Definition Classes
    sigma
  • package reflection

    Contains the Sigma Reflection API.

    Contains the Sigma Reflection API. Sigma reflection is a mechanism for obtaining metadata about classes, methods, fields, etc. at runtime. It is used by kiama to rewrite ErgoTree expressions. It is also used by the ErgoTree interpreter to implement MethodCall nodes.

    The Sigma Reflection API has two implementations: 1) based on the Java Reflection API 2) based on Sigma Reflection metadata declared in the StaticImpl.scala file

    Definition Classes
    sigma
  • JRClass
  • JRConstructor
  • JRField
  • JRMethod
  • Platform
  • RClass
  • RConstructor
  • RField
  • RMethod
  • ReflectionData
  • SRClass
  • SRConstructor
  • SRField
  • SRMethod
  • package serialization
    Definition Classes
    sigma
  • package util
    Definition Classes
    sigma
  • package utils
    Definition Classes
    sigma
  • package validation
    Definition Classes
    sigma
  • package wrappers
    Definition Classes
    sigma
p

sigma

reflection

package reflection

Contains the Sigma Reflection API. Sigma reflection is a mechanism for obtaining metadata about classes, methods, fields, etc. at runtime. It is used by kiama to rewrite ErgoTree expressions. It is also used by the ErgoTree interpreter to implement MethodCall nodes.

The Sigma Reflection API has two implementations: 1) based on the Java Reflection API 2) based on Sigma Reflection metadata declared in the StaticImpl.scala file

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. reflection
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class JRClass[T] extends RClass[T]

    A class that represents a Java class of type T.

  2. class JRConstructor[T] extends RConstructor[T]

    Implements RConstructor using Java reflection.

    Implements RConstructor using Java reflection.

    T

    The type of the class that declares this constructor.

  3. class JRField extends RField

    Implements RField using Java reflection.

  4. class JRMethod extends RMethod

    Implements RMethod using Java reflection.

  5. abstract class RClass[T] extends AnyRef

    Represents a class that can be reflected upon to obtain information about its fields, methods, constructors and superclass.

    Represents a class that can be reflected upon to obtain information about its fields, methods, constructors and superclass.

    T

    The type represented by this RClass.

  6. trait RConstructor[T] extends AnyRef

    A representation of a constructor of a class, providing reflective access to the constructor's parameters and ability to create new instances.

    A representation of a constructor of a class, providing reflective access to the constructor's parameters and ability to create new instances.

    T

    the type of the class

  7. abstract class RField extends AnyRef

    A representation of a field of a class, providing reflective access to the field's type.

  8. abstract class RMethod extends AnyRef

    Represents a method that can be invoked on an object with arguments.

  9. class SRClass[T] extends RClass[T]

    Represents a class in an Sigma Reflection metadata.

    Represents a class in an Sigma Reflection metadata. Extends RClass by providing a concrete implementation without relying on Java reflection.

  10. abstract class SRConstructor[T] extends RConstructor[T]

    Represents a constructor in an Sigma Reflection metadata.

    Represents a constructor in an Sigma Reflection metadata. Extends RConstructor by providing a concrete implementation without relying on Java reflection.

  11. class SRField extends RField

    Represents a field in an Sigma Reflection metadata.

    Represents a field in an Sigma Reflection metadata. Extends RField by providing a concrete implementation without relying on Java reflection. The instances of this class are used as parameters of registerClassEntry method.

  12. abstract class SRMethod extends RMethod

    Represents a method in an Sigma Reflection metadata.

    Represents a method in an Sigma Reflection metadata. Extends RMethod by providing a concrete implementation without relying on Java reflection.

Value Members

  1. def memoize[K, V](map: Map[K, V])(key: K, value: => V): V

    Memoizes a value in a mutable HashMap.

    Memoizes a value in a mutable HashMap.

    map

    The mutable HashMap to store the key-value pair.

    key

    The key to store in the map.

    value

    The value to be evaluated and stored in the map if the key is not present.

    returns

    The value associated with the given key in the map. If the key is not present in the map, evaluates the value parameter and stores it in the map before returning it.

  2. def mkConstructor(parameterTypes: Array[Class[_]])(handler: (Array[AnyRef]) => Any): SRConstructor[Any]

    Creates a new SRConstructor instance with the given parameter types and handler function.

    Creates a new SRConstructor instance with the given parameter types and handler function.

    parameterTypes

    the types of the constructor's parameters

    handler

    a function that handles creating a new instance using this constructor

    returns

    an SRConstructor instance

  3. def mkMethod(clazz: Class[_], name: String, paramTypes: Seq[Class[_]])(handler: (Any, Array[AnyRef]) => Any): ((String, Seq[Class[_]]), RMethod)

    Creates a new SRMethod instance with the given parameters and handler function.

    Creates a new SRMethod instance with the given parameters and handler function. This is analogous to the Java Reflection API's java.lang.reflect.Method class.

    clazz

    the java.lang.Class that declares the method

    name

    the name of the method

    paramTypes

    the types of the method's parameters

    handler

    a function that handles invoking the method, when RMethod.invoke is called then this handler is called

    returns

    a tuple containing the method's name and parameter types as its first element, and an SRMethod instance as its second element

    See also

    SRMethod

  4. object JRConstructor
  5. object JRField
  6. object JRMethod
  7. object Platform

    Platform dependent implementation of reflection methods.

  8. object RClass
  9. object ReflectionData

    Reflection metadata and global dictionaries to access it.

    Reflection metadata and global dictionaries to access it. Such metadata is only used on JS platform to support reflection-like interfaces of RClass, RMethod, RConstructor. These interfaces implemented on JVM using Java reflection.

    For each class that needs reflection metadata, we register a class entry using registerClassEntry method with the necessary information such as constructors and methods. Only information that is needed at runtime is registered.

    See also

    mkConstructor, mkMethod

Inherited from AnyRef

Inherited from Any

Ungrouped