typed.clj.analyzer.utils
all-instance-methods
(all-instance-methods class method)
all-static-methods
(all-static-methods class method)
array-class
(array-class element-type)(array-class n element-type)
assignable-from?
macro
(assignable-from? t1 t2)
box
(box c)
If the argument is a primitive Class, returns its boxed equivalent,
otherwise returns the argument
convertible?
(convertible? c1 c2)
Returns true if it's possible to convert from c1 to c2
inline?
(inline? sym args env)
instance-field
(instance-field class f)
instance-method
(instance-method class method)
instance-methods
(instance-methods class method argc)
maybe-array-class-sym
(maybe-array-class-sym x)
maybe-class
multimethod
Takes a Symbol, String or Class and tries to resolve to a matching Class
maybe-class-from-string
(maybe-class-from-string s)
maybe-class-literal
(maybe-class-literal x)
members
(members class)(members class member)
name-matches?
(name-matches? member)
ns->relpath
(ns->relpath s)
numeric?
(numeric? c)
Returns true if the given class is numeric
prim-interface
(prim-interface tags)
prim-or-obj
(prim-or-obj tag)
If the given Class is a primitive, returns that Class, otherwise returns Object
primitive?
Returns non-nil if the argument represents a primitive Class other than Void
resolve-sym
(resolve-sym sym {:keys [ns locals], :as env})
Resolves the value mapped by the given sym in the global env
If sym is shadowed by a local in env, returns nil.
special-arrays
(special-arrays c)
static-field
(static-field class f)
static-method
(static-method class method)
static-methods
(static-methods class method argc)
subsumes?
(subsumes? c1 c2)
Returns true if c2 is subsumed by c1
tag-match?
(tag-match? arg-tags meth)
try-best-match
(try-best-match tags methods)
Given a vector of arg tags and a collection of methods, tries to return the
subset of methods that match best the given tags
unbox
(unbox c)
If the argument is a Class with a primitive equivalent, returns that,
otherwise returns the argument
wider-primitive
(wider-primitive from to)
Given two numeric primitive Classes, returns the wider one
wider-tag
(wider-tag tags)
Given a collection of Classes returns the wider one
wider-tag*
(wider-tag* from to)
Given two Classes returns the wider one
wider-than
If the argument is a numeric primitive Class, returns a set of primitive Classes
that are narrower than the given one