A class that represents a Java class of type T
.
Implements RConstructor using Java reflection.
Implements RConstructor using Java reflection.
The type of the class that declares this constructor.
Implements RField using Java reflection.
Implements RMethod using Java reflection.
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.
The type represented by this RClass
.
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.
the type of the class
A representation of a field of a class, providing reflective access to the field's type.
Represents a method that can be invoked on an object with arguments.
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.
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.
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.
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.
Platform dependent implementation of reflection methods.
Reflection metadata and global dictionaries to access it.
Reflection metadata and global dictionaries to access it. For each class of this module that needs reflection metadata, we register a class entry with the necessary information. Only information that is needed at runtime is registered.
Memoizes a value in a mutable HashMap.
Memoizes a value in a mutable HashMap.
The mutable HashMap to store the key-value pair.
The key to store in the map.
The value to be evaluated and stored in the map if the key is not present.
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.
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.
the types of the constructor's parameters
a function that handles creating a new instance using this constructor
an SRConstructor instance
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.
the java.lang.Class that declares the method
the name of the method
the types of the method's parameters
a function that handles invoking the method, when RMethod.invoke
is called then this handler
is called
a tuple containing the method's name and parameter types as its first element, and an SRMethod instance as its second element
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