Package com.sun.codemodel

Examples of com.sun.codemodel.JDefinedClass.fields()


    local = replaceAndUpperCase(new StringBuffer(local));
   
    JFieldVar var = cls.fields().get(local);
    if (var == null) {
      local = "_" + local;
      var = cls.fields().get(local);
    }
   
    if (var == null) {
      // fall back to original detection algorithm
      return null;
View Full Code Here


                        + targetClass.fullName() + "#" + fieldName + " and hence won't be removed.");
            c.unmarkForRemoval();
          }
        }

        JFieldVar originalImplField = targetClass.fields().get(fieldName);

        if (candidate == null) {
          checkAnnotationReference(candidatesMap, originalImplField);

          continue;
View Full Code Here

      }

      JFieldVar field = null;

      // * The candidate class should have exactly one property
      for (JFieldVar f : candidateClass.fields().values()) {
        if ((f.mods().getValue() & JMod.STATIC) == JMod.STATIC) {
          continue;
        }

        // If there are at least two non-static fields, we discard this candidate:
View Full Code Here

    QName qname = mapping.getElement();
    JDefinedClass theClass = (JDefinedClass) mapping.getType().getTypeClass();
    SimpleStructureDefinition structure = new SimpleStructureDefinition(this.namespace + qname.getLocalPart());
    this.structures.put(structure.getId(), structure);
   
    Map<String, JFieldVar> fields = theClass.fields();
    int index = 0;
    for (Entry<String, JFieldVar> entry : fields.entrySet()) {
      Class<?> fieldClass = ReflectUtil.loadClass(entry.getValue().type().boxify().fullName());
      structure.setFieldName(index, entry.getKey(), fieldClass);
      index++;
View Full Code Here

  private void importStructure(Mapping mapping) {
    QName qname = mapping.getElement();
    JDefinedClass theClass = (JDefinedClass) mapping.getType().getTypeClass();
    SimpleStructureDefinition structure = (SimpleStructureDefinition) this.structures.get(this.namespace + qname.getLocalPart());
   
    Map<String, JFieldVar> fields = theClass.fields();
    int index = 0;
    for (Entry<String, JFieldVar> entry : fields.entrySet()) {
      Class<?> fieldClass = ReflectUtil.loadClass(entry.getValue().type().boxify().fullName());
      structure.setFieldName(index, entry.getKey(), fieldClass);
      index++;
View Full Code Here

    QName qname = mapping.getElement();
    JDefinedClass theClass = (JDefinedClass) mapping.getType().getTypeClass();
    SimpleStructureDefinition structure = new SimpleStructureDefinition(this.namespace + qname.getLocalPart());
    this.structures.put(structure.getId(), structure);
   
    Map<String, JFieldVar> fields = theClass.fields();
    int index = 0;
    for (Entry<String, JFieldVar> entry : fields.entrySet()) {
      Class<?> fieldClass = ReflectUtil.loadClass(entry.getValue().type().boxify().fullName());
      structure.setFieldName(index, entry.getKey(), fieldClass);
      index++;
View Full Code Here

  private void importStructure(Mapping mapping) {
    QName qname = mapping.getElement();
    JDefinedClass theClass = (JDefinedClass) mapping.getType().getTypeClass();
    SimpleStructureDefinition structure = (SimpleStructureDefinition) this.structures.get(this.namespace + qname.getLocalPart());
   
    Map<String, JFieldVar> fields = theClass.fields();
    int index = 0;
    for (Entry<String, JFieldVar> entry : fields.entrySet()) {
      Class<?> fieldClass = ReflectUtil.loadClass(entry.getValue().type().boxify().fullName());
      structure.setFieldName(index, entry.getKey(), fieldClass);
      index++;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.