org.jboss.errai.codegen.meta.MetaClass.getInheritedField()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(109)

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

MetaClass.getInheritedField介绍

[英]Searches for the named field in this type, its superinterfaces, and its superclasses.

The search proceeds as in #getField(String), but includes all public, protected, default accessibility, and private fields. Whether a field is static or not does not affect this search.
[中]搜索此类型中的命名字段、其超接口及其超类。
搜索按#getField(字符串)进行,但包括所有公共、受保护、默认可访问性和私有字段。字段是否为静态不会影响此搜索。

代码示例

代码示例来源:origin: org.jboss.errai/errai-data-binding

private String inferSafeFieldName(String fieldName) {
 while (bindable.getInheritedField(fieldName) != null) {
  fieldName = "_" + fieldName;
 }
 return fieldName;
}

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

private String inferSafeFieldName(String fieldName) {
 while (bindable.getInheritedField(fieldName) != null) {
  fieldName = "_" + fieldName;
 }
 return fieldName;
}

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

@Override
public MetaField getInheritedField(final String name) {
 MetaField f = getDeclaredField(name);
 if (f != null)
  return f;
 for (final MetaClass iface : getInterfaces()) {
  f = iface.getInheritedField(name);
  if (f != null)
   return f;
 }
 if (getSuperClass() != null) {
  return getSuperClass().getInheritedField(name);
 }
 return null;
}

代码示例来源:origin: org.jboss.errai/errai-codegen

@Override
public MetaField getInheritedField(final String name) {
 MetaField f = getDeclaredField(name);
 if (f != null)
  return f;
 for (final MetaClass iface : getInterfaces()) {
  f = iface.getInheritedField(name);
  if (f != null)
   return f;
 }
 if (getSuperClass() != null) {
  return getSuperClass().getInheritedField(name);
 }
 return null;
}

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

if (val.startsWith("{") && val.endsWith("}")) {
 String fieldName = val.substring(1, val.length() - 1);
 MetaField field = decorable.getDecorableDeclaringType().getInheritedField(fieldName);
 fieldValueStmt =
   InjectUtil.getPublicOrPrivateFieldValue(controller, field);

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

field = statement.getType().getInheritedField(fieldName);

代码示例来源:origin: org.jboss.errai/errai-codegen

field = statement.getType().getInheritedField(fieldName);

相关文章