com.sun.codemodel.JClass.toString()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(74)

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

JClass.toString介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.moxy

private boolean notAnnotated(JFieldVar fieldVar, JClass annotationClass) {
  for (JAnnotationUse annotationUse : fieldVar.annotations())
    if ((annotationUse.getAnnotationClass().toString().equals(annotationClass.toString())))
      return false;
  return true;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

private boolean notAnnotated(JFieldVar fieldVar, JClass annotationClass) {
  for (JAnnotationUse annotationUse : fieldVar.annotations())
    if ((annotationUse.getAnnotationClass().toString().equals(annotationClass.toString())))
      return false;
  return true;
}

代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.moxy

/**
 * Checks if the desired annotation is not a boundary of a primitive type and
 * Checks if the fieldVar is already annotated with the desired annotation.
 *
 * @return true if the fieldVar should be annotated, false if the fieldVar is
 * already annotated or the value is a default boundary.
 */
private boolean notAnnotatedAndNotDefaultBoundary(JFieldVar fieldVar, JClass annotationClass, String boundaryValue) {
  if (isDefaultBoundary(fieldVar.type().name(), annotationClass.fullName(), boundaryValue))
    return false;
  for (JAnnotationUse annotationUse : fieldVar.annotations()) {
    if ((annotationUse.getAnnotationClass().toString().equals(annotationClass.toString()))) {
      boolean previousAnnotationRemoved = false;
      String annotationName = annotationUse.getAnnotationClass().fullName();
      if (annotationName.equals(ANNOTATION_DECIMALMIN.fullName()))
        previousAnnotationRemoved = isMoreSpecificBoundary(fieldVar, boundaryValue, annotationUse, false);
      else if (annotationName.equals(ANNOTATION_DECIMALMAX.fullName()))
        previousAnnotationRemoved = isMoreSpecificBoundary(fieldVar, boundaryValue, annotationUse, true);
      // If the previous field's annotation was removed, the fieldVar
      // now is not annotated and should be given a new annotation,
      // i.e. return true.
      return previousAnnotationRemoved;
    }
  }
  return true;
}

代码示例来源:origin: com.haulmont.thirdparty/eclipselink

/**
 * Checks if the desired annotation is not a boundary of a primitive type and
 * Checks if the fieldVar is already annotated with the desired annotation.
 *
 * @return true if the fieldVar should be annotated, false if the fieldVar is
 * already annotated or the value is a default boundary.
 */
private boolean notAnnotatedAndNotDefaultBoundary(JFieldVar fieldVar, JClass annotationClass, String boundaryValue) {
  if (isDefaultBoundary(fieldVar.type().name(), annotationClass.fullName(), boundaryValue))
    return false;
  for (JAnnotationUse annotationUse : fieldVar.annotations()) {
    if ((annotationUse.getAnnotationClass().toString().equals(annotationClass.toString()))) {
      boolean previousAnnotationRemoved = false;
      String annotationName = annotationUse.getAnnotationClass().fullName();
      if (annotationName.equals(decimalMinAnn.fullName()))
        previousAnnotationRemoved = isMoreSpecificBoundary(fieldVar, boundaryValue, annotationUse, false);
      else if (annotationName.equals(decimalMaxAnn.fullName()))
        previousAnnotationRemoved = isMoreSpecificBoundary(fieldVar, boundaryValue, annotationUse, true);
      // If the previous field's annotation was removed, the fieldVar
      // now is not annotated and should be given a new annotation,
      // i.e. return true.
      return previousAnnotationRemoved;
    }
  }
  return true;
}

代码示例来源:origin: org.projectodd.shrinkwrap.descriptors/shrinkwrap-descriptors-metadata-parser

List<JClass> types = child.getTypeParameters();
for (JClass jclass : types) {
  jclass.toString();

代码示例来源:origin: org.jboss.shrinkwrap.descriptors/shrinkwrap-descriptors-metadata-parser

List<JClass> types = child.getTypeParameters();
for (JClass jclass : types) {
  jclass.toString();

相关文章