javassist.compiler.ast.Keyword.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(8.1k)|赞(0)|评价(0)|浏览(106)

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

Keyword.<init>介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

private ASTList parseMemberMods() {
  int t;
  ASTList list = null;
  while (true) {
    t = lex.lookAhead();
    if (t == ABSTRACT || t == FINAL || t == PUBLIC || t == PROTECTED
      || t == PRIVATE || t == SYNCHRONIZED || t == STATIC
      || t == VOLATILE || t == TRANSIENT || t == STRICT)
      list = new ASTList(new Keyword(lex.get()), list);
    else
      break;
  }
  return list;
}

代码示例来源:origin: org.javassist/javassist

private ASTList parseMemberMods() {
  int t;
  ASTList list = null;
  while (true) {
    t = lex.lookAhead();
    if (t == ABSTRACT || t == FINAL || t == PUBLIC || t == PROTECTED
      || t == PRIVATE || t == SYNCHRONIZED || t == STATIC
      || t == VOLATILE || t == TRANSIENT || t == STRICT)
      list = new ASTList(new Keyword(lex.get()), list);
    else
      break;
  }
  return list;
}

代码示例来源:origin: redisson/redisson

public static ASTree getConstantFieldValue(CtField f) {
  if (f == null)
    return null;
  Object value = f.getConstantValue();
  if (value == null)
    return null;
  if (value instanceof String)
    return new StringL((String)value);
  else if (value instanceof Double || value instanceof Float) {
    int token = (value instanceof Double)
          ? DoubleConstant : FloatConstant;
    return new DoubleConst(((Number)value).doubleValue(), token);
  }
  else if (value instanceof Number) {
    int token = (value instanceof Long) ? LongConstant : IntConstant; 
    return new IntConst(((Number)value).longValue(), token);
  }
  else if (value instanceof Boolean)
    return new Keyword(((Boolean)value).booleanValue()
              ? TokenId.TRUE : TokenId.FALSE);
  else
    return null;
}

代码示例来源:origin: org.javassist/javassist

public static ASTree getConstantFieldValue(CtField f) {
  if (f == null)
    return null;
  Object value = f.getConstantValue();
  if (value == null)
    return null;
  if (value instanceof String)
    return new StringL((String)value);
  else if (value instanceof Double || value instanceof Float) {
    int token = (value instanceof Double)
          ? DoubleConstant : FloatConstant;
    return new DoubleConst(((Number)value).doubleValue(), token);
  }
  else if (value instanceof Number) {
    int token = (value instanceof Long) ? LongConstant : IntConstant; 
    return new IntConst(((Number)value).longValue(), token);
  }
  else if (value instanceof Boolean)
    return new Keyword(((Boolean)value).booleanValue()
              ? TokenId.TRUE : TokenId.FALSE);
  else
    return null;
}

代码示例来源:origin: redisson/redisson

case FALSE :
case NULL :
  return new Keyword(t);
case Identifier :
  name = lex.getString();

代码示例来源:origin: org.javassist/javassist

case FALSE :
case NULL :
  return new Keyword(t);
case Identifier :
  name = lex.getString();

代码示例来源:origin: redisson/redisson

expr = parseDotClass(expr, 0);
else if (t == SUPER)
  expr = Expr.make('.', new Symbol(toClassName(expr)), new Keyword(t));
else if (t == Identifier) {
  str = lex.getString();

代码示例来源:origin: org.javassist/javassist

expr = parseDotClass(expr, 0);
else if (t == SUPER)
  expr = Expr.make('.', new Symbol(toClassName(expr)), new Keyword(t));
else if (t == Identifier) {
  str = lex.getString();

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

private ASTList parseMemberMods() {
  int t;
  ASTList list = null;
  while (true) {
    t = lex.lookAhead();
    if (t == ABSTRACT || t == FINAL || t == PUBLIC || t == PROTECTED
      || t == PRIVATE || t == SYNCHRONIZED || t == STATIC
      || t == VOLATILE || t == TRANSIENT || t == STRICT)
      list = new ASTList(new Keyword(lex.get()), list);
    else
      break;
  }
  return list;
}

代码示例来源:origin: org.jboss.javassist/com.springsource.javassist

private ASTList parseMemberMods() {
  int t;
  ASTList list = null;
  while (true) {
    t = lex.lookAhead();
    if (t == ABSTRACT || t == FINAL || t == PUBLIC || t == PROTECTED
      || t == PRIVATE || t == SYNCHRONIZED || t == STATIC
      || t == VOLATILE || t == TRANSIENT || t == STRICT)
      list = new ASTList(new Keyword(lex.get()), list);
    else
      break;
  }
  return list;
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

private ASTList parseMemberMods() {
  int t;
  ASTList list = null;
  while (true) {
    t = lex.lookAhead();
    if (t == ABSTRACT || t == FINAL || t == PUBLIC || t == PROTECTED
      || t == PRIVATE || t == SYNCHRONIZED || t == STATIC
      || t == VOLATILE || t == TRANSIENT || t == STRICT)
      list = new ASTList(new Keyword(lex.get()), list);
    else
      break;
  }
  return list;
}

代码示例来源:origin: org.jboss/javassist

private ASTList parseMemberMods() {
  int t;
  ASTList list = null;
  while (true) {
    t = lex.lookAhead();
    if (t == ABSTRACT || t == FINAL || t == PUBLIC || t == PROTECTED
      || t == PRIVATE || t == SYNCHRONIZED || t == STATIC
      || t == VOLATILE || t == TRANSIENT || t == STRICT)
      list = new ASTList(new Keyword(lex.get()), list);
    else
      break;
  }
  return list;
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

private ASTList parseMemberMods() {
  int t;
  ASTList list = null;
  while (true) {
    t = lex.lookAhead();
    if (t == ABSTRACT || t == FINAL || t == PUBLIC || t == PROTECTED
      || t == PRIVATE || t == SYNCHRONIZED || t == STATIC
      || t == VOLATILE || t == TRANSIENT || t == STRICT)
      list = new ASTList(new Keyword(lex.get()), list);
    else
      break;
  }
  return list;
}

代码示例来源:origin: com.eclipsesource.jaxrs/jersey-all

public static ASTree getConstantFieldValue(CtField f) {
  if (f == null)
    return null;
  Object value = f.getConstantValue();
  if (value == null)
    return null;
  if (value instanceof String)
    return new StringL((String)value);
  else if (value instanceof Double || value instanceof Float) {
    int token = (value instanceof Double)
          ? DoubleConstant : FloatConstant;
    return new DoubleConst(((Number)value).doubleValue(), token);
  }
  else if (value instanceof Number) {
    int token = (value instanceof Long) ? LongConstant : IntConstant; 
    return new IntConst(((Number)value).longValue(), token);
  }
  else if (value instanceof Boolean)
    return new Keyword(((Boolean)value).booleanValue()
              ? TokenId.TRUE : TokenId.FALSE);
  else
    return null;
}

代码示例来源:origin: org.jboss/javassist

public static ASTree getConstantFieldValue(CtField f) {
  if (f == null)
    return null;
  Object value = f.getConstantValue();
  if (value == null)
    return null;
  if (value instanceof String)
    return new StringL((String)value);
  else if (value instanceof Double || value instanceof Float) {
    int token = (value instanceof Double)
          ? DoubleConstant : FloatConstant;
    return new DoubleConst(((Number)value).doubleValue(), token);
  }
  else if (value instanceof Number) {
    int token = (value instanceof Long) ? LongConstant : IntConstant; 
    return new IntConst(((Number)value).longValue(), token);
  }
  else if (value instanceof Boolean)
    return new Keyword(((Boolean)value).booleanValue()
              ? TokenId.TRUE : TokenId.FALSE);
  else
    return null;
}

代码示例来源:origin: org.jboss.javassist/com.springsource.javassist

public static ASTree getConstantFieldValue(CtField f) {
  if (f == null)
    return null;
  Object value = f.getConstantValue();
  if (value == null)
    return null;
  if (value instanceof String)
    return new StringL((String)value);
  else if (value instanceof Double || value instanceof Float) {
    int token = (value instanceof Double)
          ? DoubleConstant : FloatConstant;
    return new DoubleConst(((Number)value).doubleValue(), token);
  }
  else if (value instanceof Number) {
    int token = (value instanceof Long) ? LongConstant : IntConstant; 
    return new IntConst(((Number)value).longValue(), token);
  }
  else if (value instanceof Boolean)
    return new Keyword(((Boolean)value).booleanValue()
              ? TokenId.TRUE : TokenId.FALSE);
  else
    return null;
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

public static ASTree getConstantFieldValue(CtField f) {
  if (f == null)
    return null;
  Object value = f.getConstantValue();
  if (value == null)
    return null;
  if (value instanceof String)
    return new StringL((String)value);
  else if (value instanceof Double || value instanceof Float) {
    int token = (value instanceof Double)
          ? DoubleConstant : FloatConstant;
    return new DoubleConst(((Number)value).doubleValue(), token);
  }
  else if (value instanceof Number) {
    int token = (value instanceof Long) ? LongConstant : IntConstant; 
    return new IntConst(((Number)value).longValue(), token);
  }
  else if (value instanceof Boolean)
    return new Keyword(((Boolean)value).booleanValue()
              ? TokenId.TRUE : TokenId.FALSE);
  else
    return null;
}

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

public static ASTree getConstantFieldValue(CtField f) {
  if (f == null)
    return null;
  Object value = f.getConstantValue();
  if (value == null)
    return null;
  if (value instanceof String)
    return new StringL((String)value);
  else if (value instanceof Double || value instanceof Float) {
    int token = (value instanceof Double)
          ? DoubleConstant : FloatConstant;
    return new DoubleConst(((Number)value).doubleValue(), token);
  }
  else if (value instanceof Number) {
    int token = (value instanceof Long) ? LongConstant : IntConstant; 
    return new IntConst(((Number)value).longValue(), token);
  }
  else if (value instanceof Boolean)
    return new Keyword(((Boolean)value).booleanValue()
              ? TokenId.TRUE : TokenId.FALSE);
  else
    return null;
}

代码示例来源:origin: org.jboss.javassist/com.springsource.javassist

case FALSE :
case NULL :
  return new Keyword(t);
case Identifier :
  name = lex.getString();

代码示例来源:origin: hstaudacher/osgi-jax-rs-connector

case FALSE :
case NULL :
  return new Keyword(t);
case Identifier :
  name = lex.getString();

相关文章