Examples of MField


Examples of com.alibaba.druid.support.monitor.annotation.MField

                tableName = annotation.name();
            }

            for (Field field : clazz.getDeclaredFields()) {
                MField annotation = field.getAnnotation(MField.class);
                if (annotation == null) {
                    continue;
                }

                String columnName = annotation.name();
                if (StringUtils.isEmpty(columnName)) {
                    columnName = field.getName();
                }

                Field hashFor = null;
                String hashForType = null;
                if (!StringUtils.isEmpty(annotation.hashFor())) {
                    try {
                        hashFor = clazz.getDeclaredField(annotation.hashFor());
                        hashForType = annotation.hashForType();
                    } catch (Exception e) {
                        throw new IllegalStateException("hashFor error", e);
                    }
                }

                FieldInfo fieldInfo = new FieldInfo(field, columnName, hashFor, hashForType);
                fields.add(fieldInfo);

                if (annotation.groupBy()) {
                    groupByFields.add(fieldInfo);
                }

                if (hashFor != null) {
                    hashFields.add(fieldInfo);
View Full Code Here

Examples of com.alibaba.druid.support.monitor.annotation.MField

                tableName = annotation.name();
            }

            for (Field field : clazz.getDeclaredFields()) {
                MField annotation = field.getAnnotation(MField.class);
                if (annotation == null) {
                    continue;
                }

                String columnName = annotation.name();
                if (StringUtils.isEmpty(columnName)) {
                    columnName = field.getName();
                }

                Field hashFor = null;
                String hashForType = null;
                if (!StringUtils.isEmpty(annotation.hashFor())) {
                    try {
                        hashFor = clazz.getDeclaredField(annotation.hashFor());
                        hashForType = annotation.hashForType();
                    } catch (Exception e) {
                        throw new IllegalStateException("hashFor error", e);
                    }
                }

                FieldInfo fieldInfo = new FieldInfo(field, columnName, hashFor, hashForType);
                fields.add(fieldInfo);

                if (annotation.groupBy()) {
                    groupByFields.add(fieldInfo);
                }

                if (hashFor != null) {
                    hashFields.add(fieldInfo);
View Full Code Here

Examples of org.codehaus.jam.mutable.MField

    nextElement();
  }

  private void readField(MClass clazz) throws XMLStreamException {
    assertStart(FIELD);
    MField field = clazz.addNewField();
    nextElement();
    field.setSimpleName(assertCurrentString(NAME));
    field.setModifiers(assertCurrentInt(MODIFIERS));
    field.setType(assertCurrentString(TYPE));
    readAnnotatedElement(field);
    assertEnd(FIELD);
    nextElement();
  }
View Full Code Here

Examples of org.codehaus.jam.mutable.MField

    return out;
  }

  public MField addNewField() {
    if (mFields == null) mFields = new ArrayList();
    MField out = new FieldImpl(defaultName(mFields.size()),
                                this,"java.lang.Object");
    mFields.add(out);
    return out;
  }
View Full Code Here

Examples of org.codehaus.jam.mutable.MField

    nextElement();
  }

  private void readField(MClass clazz) throws XMLStreamException {
    assertStart(FIELD);
    MField field = clazz.addNewField();
    nextElement();
    field.setSimpleName(assertCurrentString(NAME));
    field.setModifiers(assertCurrentInt(MODIFIERS));
    field.setType(assertCurrentString(TYPE));
    readAnnotatedElement(field);
    assertEnd(FIELD);
    nextElement();
  }
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.