本文整理了Java中clojure.lang.RT.classForName
方法的一些代码示例,展示了RT.classForName
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RT.classForName
方法的具体详情如下:
包路径:clojure.lang.RT
类名称:RT
方法名:classForName
暂无
代码示例来源:origin: org.dunaj/clojure
static public Class loadClassForName(String name) {
try
{
classForNameNonLoading(name);
}
catch(Exception e)
{
if (e instanceof ClassNotFoundException)
return null;
else
throw Util.sneakyThrow(e);
}
return classForName(name);
}
代码示例来源:origin: org.dunaj/clojure
public static Object invokeStaticMethod(String className, String methodName, Object[] args) {
Class c = RT.classForName(className);
return invokeStaticMethod(c, methodName, args);
}
代码示例来源:origin: org.dunaj/clojure
public static Object getStaticField(String className, String fieldName) {
Class c = RT.classForName(className);
return getStaticField(c, fieldName);
}
代码示例来源:origin: org.dunaj/clojure
static public Class classForName(String name) {
return classForName(name, true, baseLoader());
}
代码示例来源:origin: org.dunaj/clojure
public static Object setStaticField(String className, String fieldName, Object val) {
Class c = RT.classForName(className);
return setStaticField(c, fieldName, val);
}
代码示例来源:origin: org.dunaj/clojure
static public Class classForNameNonLoading(String name) {
return classForName(name, false, baseLoader());
}
代码示例来源:origin: org.dunaj/clojure
return (Class) COMPILE_STUB_CLASS.get();
if(sym.name.indexOf('.') > 0 || sym.name.charAt(0) == '[')
c = RT.classForName(sym.name);
else
c = RT.classForName(sym.name);
c = RT.classForName((String) form);
return c;
代码示例来源:origin: org.dunaj/clojure
static public Object maybeResolveIn(Namespace n, Symbol sym) {
//note - ns-qualified vars must already exist
if(sym.ns != null)
{
Namespace ns = namespaceFor(n, sym);
if(ns == null)
return null;
Var v = ns.findInternedVar(Symbol.intern(sym.name));
if(v == null)
return null;
return v;
}
else if(sym.name.indexOf('.') > 0 && !sym.name.endsWith(".")
|| sym.name.charAt(0) == '[')
{
return RT.classForName(sym.name);
}
else if(sym.equals(NS))
return RT.NS_VAR;
else if(sym.equals(IN_NS))
return RT.IN_NS_VAR;
else
{
Object o = n.getMapping(sym);
return o;
}
}
代码示例来源:origin: mikera/kiss
private static Type analyseTypeSymbol(Symbol sym) {
if (sym.equals(Symbols.ANY)) return Types.ANYTHING;
if (sym.equals(Symbols.NOTHING)) return Types.NOTHING;
if (sym.equals(Symbols.NIL)) return Types.NULL;
if (sym.equals(Symbols.TYPE)) return Types.TYPE;
if (sym.equals(Symbols.SYMBOL_TYPE)) return Types.SYMBOL;
if (sym.equals(Symbols.KEYWORD_TYPE)) return Types.KEYWORD;
if (sym.getNamespace()==null) {
String name=sym.getName();
if (!name.contains(".")) name="java.lang."+name;
Class<?> c=RT.classForName(name);
if (c!=null) return JavaType.create(c);
}
throw new KissException("Unrecognised type symbol: "+sym);
}
代码示例来源:origin: org.dunaj/clojure
if(o instanceof Symbol)
return RT.classForName(o.toString());
return Reflector.invokeConstructor(RT.classForName(fs.name.substring(0, fs.name.length() - 1)), args);
代码示例来源:origin: org.dunaj/clojure
return RT.classForName(sym.name);
内容来源于网络,如有侵权,请联系作者删除!