javax.lang.model.type.ErrorType类的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.3k)|赞(0)|评价(0)|浏览(199)

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

ErrorType介绍

[英]Represents a class or interface type that cannot be properly modeled. This may be the result of a processing error, such as a missing class file or erroneous source code. Most queries for information derived from such a type (such as its members or its supertype) will not, in general, return meaningful results.
[中]表示无法正确建模的类或接口类型。这可能是处理错误的结果,例如缺少类文件或错误的源代码。对于从此类类型(如其成员或其超类型)派生的信息的大多数查询通常不会返回有意义的结果。

代码示例

代码示例来源:origin: org.revapi/revapi-java

@Override
  public TypeElement visitError(ErrorType t, Void aVoid) {
    return (TypeElement) t.asElement();
  }
};

代码示例来源:origin: phax/jcodemodel

@Override
public AbstractJType visitError (final ErrorType t, final Void p)
 final String typeName = t.asElement ().getSimpleName ().toString ();
 final String fullTypeName = m_aEnvironment.packageName () + "." + typeName;
 final JDefinedClass jCodeModelClass = m_aCodeModel._getClass (fullTypeName);
 if (jCodeModelClass != null)
  final List <? extends TypeMirror> typeArguments = t.getTypeArguments ();
  if (typeArguments.isEmpty ())
   return jCodeModelClass;

代码示例来源:origin: com.helger/jcodemodel

@Override
public AbstractJType visitError (final ErrorType t, final Void p)
 final String typeName = t.asElement ().getSimpleName ().toString ();
 final String fullTypeName = m_aEnvironment.packageName () + "." + typeName;
 final JDefinedClass jCodeModelClass = m_aCodeModel._getClass (fullTypeName);
 if (jCodeModelClass != null)
  final List <? extends TypeMirror> typeArguments = t.getTypeArguments ();
  if (typeArguments.isEmpty ())
   return jCodeModelClass;

代码示例来源:origin: com.google.auto/auto-common

@Override
public Element visitError(ErrorType t, Void p) {
   return t.asElement();
  }

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

@Override
  public TypeElement visitError(ErrorType t, Void aVoid) {
    return (TypeElement) t.asElement();
  }
};

代码示例来源:origin: yongjhih/RetroFacebook

@Override public Element visitError(ErrorType t, Void p) {
 return t.asElement();
}

代码示例来源:origin: 8tory/SimpleWeibo

@Override public Element visitError(ErrorType t, Void p) {
 return t.asElement();
}

代码示例来源:origin: yongjhih/RetroFacebook

@Override public Element visitError(ErrorType t, Void p) {
 return t.asElement();
}

代码示例来源:origin: yongjhih/AutoJson

@Override public Element visitError(ErrorType t, Void p) {
 return t.asElement();
}

代码示例来源:origin: org.revapi/revapi-java-spi

@Override
public Void visitError(ErrorType t, StringBuilderAndState<TypeMirror> state) {
  state.bld.append(((TypeElement) t.asElement()).getQualifiedName());
  return null;
}

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

@Override
public Void visitError(ErrorType t, StringBuilderAndState<TypeMirror> state) {
  //the missing types are like declared types but don't have any further info on them apart from the name...
  state.bld.append(((TypeElement) t.asElement()).getQualifiedName());
  return null;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-editor

@Override
  public StringBuilder visitError(ErrorType t, Void p) {
    Element e = t.asElement();
    if (e instanceof TypeElement) {
      TypeElement te = (TypeElement) e;
      return DEFAULT_VALUE.append(te.getQualifiedName().toString());
    }
    return DEFAULT_VALUE;
  }
}

代码示例来源:origin: org.revapi/revapi-java-spi

@Override
public Void visitError(ErrorType t, StringBuilderAndState<TypeMirror> state) {
  //the missing types are like declared types but don't have any further info on them apart from the name...
  state.bld.append(((TypeElement) t.asElement()).getQualifiedName());
  return null;
}

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

@Override
public Void visitError(ErrorType t, StringBuilderAndState<TypeMirror> state) {
  state.bld.append(((TypeElement) t.asElement()).getQualifiedName());
  return null;
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-groovy-editor

@Override
  public StringBuilder visitError(ErrorType t, Boolean p) {
    Element e = t.asElement();
    if (e instanceof TypeElement) {
      TypeElement te = (TypeElement)e;
      return DEFAULT_VALUE.append((p ? te.getQualifiedName() : te.getSimpleName()).toString());
    }
    return DEFAULT_VALUE;
  }
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-spring-beans

@Override
  public StringBuilder visitError(ErrorType t, Boolean p) {
    Element e = t.asElement();
    if (e instanceof TypeElement) {
      TypeElement te = (TypeElement)e;
      return DEFAULT_VALUE.append((p ? te.getQualifiedName() : te.getSimpleName()).toString());
    }
    return DEFAULT_VALUE;
  }
}

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base

@Override
public StringBuilder visitError(ErrorType t, Boolean p) {
  Element e = t.asElement();
  if (e instanceof TypeElement) {
    TypeElement te = (TypeElement)e;
    return DEFAULT_VALUE.append((p ? te.getQualifiedName() : te.getSimpleName()).toString());
  }
  return DEFAULT_VALUE;
}

代码示例来源:origin: johncarl81/transfuse

@Override
public ASTType visitError(ErrorType errorType, Void v) {
  throw new TransactionRuntimeException("Encountered ErrorType " + errorType.asElement().toString() + ", unable to recover");
}

代码示例来源:origin: org.androidtransfuse/transfuse-support

@Override
public ASTType visitError(ErrorType errorType, Void v) {
  throw new TransactionRuntimeException("Encountered ErrorType " + errorType.asElement().getSimpleName() + ", unable to recover");
}

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-java-completion

return Collections.<String>singletonList(type.toString().toLowerCase(Locale.ENGLISH));
case ERROR:
  String tn = ((ErrorType) type).asElement().getSimpleName().toString();
  if (tn.toUpperCase(Locale.ENGLISH).contentEquals(tn)) {
    return Collections.<String>singletonList(tn.toLowerCase(Locale.ENGLISH));

相关文章

ErrorType类方法