Generate a runtime signature for a class (type).
Generate a runtime signature for a class (type). For instance:
java.lang.String -> Ljava/lang/String; int -> I
The class (type)
its string signature
Determine if a value is of, or is assignable to, a specified type.
Determine if a value is of, or is assignable to, a specified type. Works with generics. Example of use:
val value: Any = ... assert(isOfType[Map[String,Int]](value))
the type against which to check the value
whether or not value
conforms to type T
Determine whether a class represents an underlying primitive or not.
Determine whether a class represents an underlying primitive or not.
For instance, Int
, Float
and Unit
all represent underlying
primitives. Note that Java classes are considered primitives if they
*are*, in fact, primitives, or if they represent boxed forms of
primitives.
the class
true
if the class represents a primitive, false
if not
Determine whether an object is a primitive or not.
Determine whether an object is a primitive or not.
the object
true
if its class is a primitive, false
if not.
Convenience method to load a class from an array of class bytes.
Convenience method to load a class from an array of class bytes.
the class loader to use
the name of the class
the class's byte code
the loaded class
Generate a runtime signature for a method.
Generate a runtime signature for a method. See, for instance: http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/method.html
method, from java.lang.reflect
its string signature
Generate a runtime signature for a method.
Generate a runtime signature for a method. See, for instance: http://journals.ecs.soton.ac.uk/java/tutorial/native1.1/implementing/method.html
the method's return type
the methods parameter types. An empty array signifies a method that takes no parameters.
its string signature
Some general-purpose class-related utility functions.