clojure.lang.RT.meta()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中clojure.lang.RT.meta方法的一些代码示例,展示了RT.meta的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RT.meta方法的具体详情如下:
包路径:clojure.lang.RT
类名称:RT
方法名:meta

RT.meta介绍

暂无

代码示例

代码示例来源:origin: org.dunaj/clojure

private static Symbol tagOf(Object o){
  Object tag = RT.get(RT.meta(o), RT.TAG_KEY);
  if(tag instanceof Symbol)
    return (Symbol) tag;
  else if(tag instanceof String)
    return Symbol.intern(null, (String) tag);
  return null;
}

代码示例来源:origin: org.dunaj/clojure

static boolean hasTag(Object o, Object tag){
  return Util.equals(tag, RT.get(RT.meta(o), TAG_KEY));
}

代码示例来源:origin: org.dunaj/clojure

public static Object preserveTag(ISeq src, Object dst) {
  Symbol tag = tagOf(src);
  if (tag != null && dst instanceof IObj) {
    IPersistentMap meta = RT.meta(dst);
    return ((IObj) dst).withMeta((IPersistentMap) RT.assoc(meta, RT.TAG_KEY, tag));
  }
  return dst;
}

代码示例来源:origin: org.dunaj/clojure

static void compile1(GeneratorAdapter gen, ObjExpr objx, Object form) {
  Object line = lineDeref();
  Object column = columnDeref();
  if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY))
    line = RT.meta(form).valAt(RT.LINE_KEY);
  if(RT.meta(form) != null && RT.meta(form).containsKey(RT.COLUMN_KEY))
    column = RT.meta(form).valAt(RT.COLUMN_KEY);
  Var.pushThreadBindings(
      RT.map(LINE, line, COLUMN, column

代码示例来源:origin: org.dunaj/clojure

private static Expr analyzeSeq(C context, ISeq form, String name) {
  Object line = lineDeref();
  Object column = columnDeref();
  if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY))
    line = RT.meta(form).valAt(RT.LINE_KEY);
  if(RT.meta(form) != null && RT.meta(form).containsKey(RT.COLUMN_KEY))
    column = RT.meta(form).valAt(RT.COLUMN_KEY);
  Var.pushThreadBindings(
      RT.map(LINE, line, COLUMN, column));

代码示例来源:origin: org.dunaj/clojure

if(RT.meta(form) != null && RT.meta(form).containsKey(RT.LINE_KEY))
  line = RT.meta(form).valAt(RT.LINE_KEY);
if(RT.meta(form) != null && RT.meta(form).containsKey(RT.COLUMN_KEY))
  column = RT.meta(form).valAt(RT.COLUMN_KEY);
Var.pushThreadBindings(RT.map(LINE, line, COLUMN, column));
try

代码示例来源:origin: org.dunaj/clojure

Symbol name = (Symbol) Symbol.intern(null,munge(dotname.name)).withMeta(RT.meta(dotname));
IPersistentVector parms = (IPersistentVector) RT.second(form);
if(parms.count() == 0)
  method.methodMeta = RT.meta(name);
  method.parms = parms;
  method.argLocals = argLocals;

代码示例来源:origin: org.dunaj/clojure

return o;
Object ometa = RT.meta(o);
for(ISeq s = RT.seq(meta); s != null; s = s.next()) {
IMapEntry kv = (IMapEntry) s.first();

代码示例来源:origin: org.dunaj/clojure

this.tag = tag;
} else if (fexpr instanceof VarExpr) {
  Object arglists = RT.get(RT.meta(((VarExpr) fexpr).var), arglistsKey);
  Object sigTag = null;
  for(ISeq s = RT.seq(arglists); s != null; s = s.next()) {

代码示例来源:origin: org.dunaj/clojure

return o;
Object ometa = RT.meta(o);
for(ISeq s = RT.seq(meta); s != null; s = s.next()) {
IMapEntry kv = (IMapEntry) s.first();

代码示例来源:origin: videlalvaro/clochure

return o;
Object ometa = RT.meta(o);
for(ISeq s = RT.seq(meta); s != null; s = s.next()) {
IMapEntry kv = (IMapEntry) s.first();

代码示例来源:origin: videlalvaro/clochure

return o;
Object ometa = RT.meta(o);
for(ISeq s = RT.seq(meta); s != null; s = s.next()) {
IMapEntry kv = (IMapEntry) s.first();

代码示例来源:origin: org.dunaj/clojure

ret = RT.list(Compiler.QUOTE, form);
if(form instanceof IObj && RT.meta(form) != null)

代码示例来源:origin: videlalvaro/clochure

ret.classMeta = RT.meta(className);
ret.internalName = ret.name.replace('.', '/');
ret.objtype = Type.getObjectType(ret.internalName);

代码示例来源:origin: org.dunaj/clojure

if(RT.meta(form) != null)
  ret = new MetaExpr(ret, MapExpr
      .parse(context == C.EVAL ? context : C.EXPRESSION, ((IObj) form).meta()));

代码示例来源:origin: org.dunaj/clojure

if(((IMeta) form.first()).meta() != null)
  fn.onceOnly = RT.booleanCast(RT.get(RT.meta(form.first()), Keyword.intern(null, "once")));
IPersistentMap fmeta = RT.meta(origForm);
if(fmeta != null)
  fmeta = fmeta.without(RT.LINE_KEY).without(RT.COLUMN_KEY).without(RT.FILE_KEY);

代码示例来源:origin: org.dunaj/clojure

ret.classMeta = RT.meta(className);
ret.internalName = ret.name.replace('.', '/');
ret.objtype = Type.getObjectType(ret.internalName);

代码示例来源:origin: org.dunaj/clojure

for(int i = 0; i < parms.count(); i++)
  IPersistentMap meta = RT.meta(parms.nth(i));
  addParameterAnnotation(gen, meta, i);

代码示例来源:origin: org.dunaj/clojure

Object arglists = RT.get(RT.meta(v), arglistsKey);
int arity = RT.count(form.next());
for(ISeq s = RT.seq(arglists); s != null; s = s.next())

代码示例来源:origin: org.dunaj/clojure

addAnnotation(fv, RT.meta(lb.sym));

相关文章