std.object.element.class

-class-convert

multimethod

added in 3.0

converts a string to its representation. Implementation function

(-class-convert Class :string) => “java.lang.Class”

(-class-convert “byte” :class) => Byte/TYPE

(-class-convert “byte” :container) => Byte

class-convert

added in 3.0

(class-convert v)(class-convert v to)

Converts a class to its representation.

(class-convert “byte”) => Byte/TYPE

(class-convert ’byte :string) => “byte”

(class-convert (Class/forName “[[B”) :string) => “byte[][]”

raw->string

added in 3.0

(raw->string v)

converts the raw array representation to a human readable form

(raw->string “[[V”) => “void[][]” (raw->string “[Ljava.lang.String;”) => “java.lang.String[]”

raw-array->string

added in 3.0

(raw-array->string v)

converts the raw representation to a more readable form

(raw-array->string “[[B”) => “byte[][]” (raw-array->string “[Ljava.lang.Class;”) => “java.lang.Class[]”

string->raw

added in 3.0

(string->raw v)

converts any string to it’s raw representation

(string->raw “java.lang.String[]”) => “[Ljava.lang.String;”

(string->raw “int[][][]”) => “[[[I”

string-array->raw

added in 3.0

(string-array->raw s)(string-array->raw s arr)

converts the human readable form to a raw string

(string-array->raw “java.lang.String[]”) “[Ljava.lang.String;”

type->raw

added in 3.0

(type->raw v)

converts to the raw representation

(type->raw Class) => “java.lang.Class” (type->raw ’byte) => “B”