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

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

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

JClass.fullName介绍

暂无

代码示例

代码示例来源:origin: joelittlejohn/jsonschema2pojo

@Override
  public int compare(JClass object1, JClass object2) {
    if (object1 == null && object2 == null) {
      return 0;
    }
    if (object1 == null) {
      return 1;
    }
    if (object2 == null) {
      return -1;
    }
    final String name1 = object1.fullName();
    final String name2 = object2.fullName();
    if (name1 == null && name2 == null) {
      return 0;
    }
    if (name1 == null) {
      return 1;
    }
    if (name2 == null) {
      return -1;
    }
    return name1.compareTo(name2);
  }
};

代码示例来源:origin: joelittlejohn/jsonschema2pojo

dataOutputStream.writeUTF(aInterface.fullName());
dataOutputStream.writeUTF(jclass._extends().fullName());

代码示例来源:origin: joelittlejohn/jsonschema2pojo

/**
 * Applies this schema rule to take the required code generation steps.
 * <p>
 * For each property present within the properties node, this rule will
 * invoke the 'property' rule provided by the given schema mapper.
 *
 * @param nodeName
 *            the name of the node for which properties are being added
 * @param node
 *            the properties node, containing property names and their
 *            definition
 * @param jclass
 *            the Java type which will have the given properties added
 * @return the given jclass
 */
@Override
public JDefinedClass apply(String nodeName, JsonNode node, JsonNode parent, JDefinedClass jclass, Schema schema) {
  if (node == null) {
    node = JsonNodeFactory.instance.objectNode();
  }
  for (Iterator<String> properties = node.fieldNames(); properties.hasNext(); ) {
    String property = properties.next();
    ruleFactory.getPropertyRule().apply(property, node.get(property), node, jclass, schema);
  }
  if (ruleFactory.getGenerationConfig().isGenerateBuilders() && !jclass._extends().name().equals("Object")) {
    addOverrideBuilders(jclass, jclass.owner()._getClass(jclass._extends().fullName()));
  }
  ruleFactory.getAnnotator().propertyOrder(jclass, node);
  return jclass;
}

代码示例来源:origin: joelittlejohn/jsonschema2pojo

if (!jclass._extends().fullName().equals(Object.class.getName())) {
  body.assign(result, result.mul(JExpr.lit(31)).plus(JExpr._super().invoke("hashCode")));

代码示例来源:origin: joelittlejohn/jsonschema2pojo

if (!jclass._extends().fullName().equals(Object.class.getName())) {
  result = result.cand(JExpr._super().invoke("equals").arg(rhsVar));

代码示例来源:origin: joelittlejohn/jsonschema2pojo

if (!jclass._extends().fullName().equals(Object.class.getName())) {
  JVar baseLength = body.decl(jclass.owner().INT, "baseLength", sb.invoke("length"));
  JVar superString = body.decl(jclass.owner().ref(String.class), "superString", JExpr._super().invoke("toString"));

代码示例来源:origin: sun-jaxb/jaxb-xjc

public String fullName() {
    return clazz.fullName();
  }
}

代码示例来源:origin: sun-jaxb/jaxb-xjc

public String fullName() {
    return base.fullName();
  }
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public String fullName() {
    return clazz.fullName();
  }
}

代码示例来源:origin: javaee/jaxb-v2

@Override
public String fullName() {
  return base.fullName();
}

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

private boolean isDefaultBoundary(String fieldVarType, String annotationClass, String boundaryValue) {
  return ANNOTATION_DECIMALMIN.fullName().equals(annotationClass)
      && nonFloatingDigitsClassesBoundaries.get(fieldVarType).min.equals(boundaryValue)
      || (ANNOTATION_DECIMALMAX.fullName().equals(annotationClass)
      && nonFloatingDigitsClassesBoundaries.get(fieldVarType).max.equals(boundaryValue));
}

代码示例来源:origin: com.sun.codemodel/codemodel

@Override
public boolean equals(Object obj) {
  if(!(obj instanceof JNarrowedClass))   return false;
  return fullName().equals(((JClass)obj).fullName());
}

代码示例来源:origin: org.glassfish.metro/webservices-tools

@Override
public boolean equals(Object obj) {
  if(!(obj instanceof JNarrowedClass))   return false;
  return fullName().equals(((JClass)obj).fullName());
}

代码示例来源:origin: javaee/jaxb-v2

@Override
public boolean equals(Object obj) {
  if(!(obj instanceof JNarrowedClass))   return false;
  return fullName().equals(((JClass)obj).fullName());
}

代码示例来源:origin: org.metatype.sxc/sxc-jaxb

public void addDependency(JClass dependency) {
  if (jaxbObjectClass.fullName().equals(dependency.fullName())) return;
  
  if (parent == null) {
    if (dependencies.add(dependency.fullName())) {
      superInvocation.arg(dependency.dotclass());
    }
  } else {
    parent.addDependency(dependency);
  }
}

代码示例来源:origin: com.envoisolutions.sxc/sxc-jaxb

public void addDependency(JClass dependency) {
  if (jaxbObjectClass.fullName().equals(dependency.fullName())) return;
  
  if (parent == null) {
    if (dependencies.add(dependency.fullName())) {
      superInvocation.arg(dependency.dotclass());
    }
  } else {
    parent.addDependency(dependency);
  }
}

代码示例来源:origin: org.objectweb.celtix/celtix-tools

public static String boxify(QName xmlTypeName, S2JJAXBModel jaxbModel) {
  TypeAndAnnotation typeAndAnnotation = jaxbModel.getJavaType(xmlTypeName);
  if (typeAndAnnotation == null) {
    return null;
  }
  return typeAndAnnotation.getTypeClass().boxify().fullName();
}

代码示例来源:origin: org.jvnet.jaxbcommons/jaxbcommons-core

public static String getClassName(final JDefinedClass theClass) {
 return (theClass.outer() == null ? theClass.fullName() : getClassName((JDefinedClass) theClass
   .outer())
   + "$"
   + theClass.name());
}

代码示例来源:origin: org.andromda.thirdparty.jaxb2_commons/jaxb-xjc

public PrivateObjectFactoryGenerator(BeanGenerator outline, Model model, JPackage targetPackage) {
  super(outline, model, targetPackage.subPackage("impl"));
  JPackage implPkg = targetPackage.subPackage("impl");
  // put JAXBContextFactory into the impl package
  JClass factory = outline.generateStaticClass(JAXBContextFactory.class,implPkg);
  // and then put jaxb.properties to point to it
  JPropertyFile jaxbProperties = new JPropertyFile("jaxb.properties");
  targetPackage.addResourceFile(jaxbProperties);
  jaxbProperties.add(
    JAXBContext.JAXB_CONTEXT_FACTORY,
    factory.fullName());
}

代码示例来源:origin: apache/servicemix-bundles

public PrivateObjectFactoryGenerator(BeanGenerator outline, Model model, JPackage targetPackage) {
  super(outline, model, targetPackage.subPackage("impl"));
  JPackage implPkg = targetPackage.subPackage("impl");
  // put JAXBContextFactory into the impl package
  JClass factory = outline.generateStaticClass(JAXBContextFactory.class,implPkg);
  // and then put jaxb.properties to point to it
  JPropertyFile jaxbProperties = new JPropertyFile("jaxb.properties");
  targetPackage.addResourceFile(jaxbProperties);
  jaxbProperties.add(
    JAXBContext.JAXB_CONTEXT_FACTORY,
    factory.fullName());
}

相关文章