Examples of PropertyName


Examples of com.asakusafw.testdriver.core.PropertyName

                        "最初の行はプロパティ名を文字列で指定してください: (id={0}, column={1})",
                        id,
                        cell.getColumnIndex() + 1));
            }
            String name = cell.getStringCellValue();
            PropertyName property = toPropertyName(cell, name);
            if (definition.getType(property) == null) {
                throw new IOException(MessageFormat.format(
                        "{0}にプロパティ\"{1}\"は定義されていません: (id={2}, column={3})",
                        definition.getModelClass().getName(),
                        property,
View Full Code Here

Examples of com.asakusafw.testdriver.core.PropertyName

    private Matcher<PropertyName> name(final String words) {
        return new BaseMatcher<PropertyName>() {
            @Override
            public boolean matches(Object o) {
                if (o instanceof PropertyName) {
                    PropertyName other = (PropertyName) o;
                    PropertyName name = PropertyName.newInstance(words.split("_"));
                    return other.equals(name);
                }
                return false;
            }
View Full Code Here

Examples of com.asakusafw.testdriver.core.PropertyName

                retrieved.add(next);
            }
            Collections.sort(retrieved, new Comparator<DataModelReflection>() {
                @Override
                public int compare(DataModelReflection o1, DataModelReflection o2) {
                    PropertyName name = PropertyName.newInstance("number");
                    Integer i1 = (Integer) o1.getValue(name);
                    Integer i2 = (Integer) o2.getValue(name);
                    return i1.compareTo(i2);
                }
            });
View Full Code Here

Examples of com.cloudbees.mtslaves.client.properties.PropertyName

    /**
     * Gets a property with databinding. The type must have {@link com.cloudbees.mtslaves.client.properties.PropertyName} annotation on it.
     */
    public <T extends Property> T getProperty(Class<T> type) {
        PropertyName pn = type.getAnnotation(PropertyName.class);
        if (pn==null)   throw new IllegalArgumentException(type+" does not have @PropertyName");

        return getProperty(pn.value(),type);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.PropertyName

    @Deprecated // since 2.3
    public ValueInjector(String propName, JavaType type,
            Annotations contextAnnotations, AnnotatedMember mutator,
            Object valueId)
    {
        this(new PropertyName(propName), type, contextAnnotations, mutator, valueId);
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.PropertyName

        this(name, scope, gen, false);
    }

    @Deprecated // since 2.3
    public ObjectIdInfo(String name, Class<?> scope, Class<? extends ObjectIdGenerator<?>> gen) {
        this(new PropertyName(name), scope, gen, false);
    }
View Full Code Here

Examples of com.google.gwt.autobean.shared.AutoBean.PropertyName

      JEnumType enumType = method.getReturnType().isEnum();
      if (enumType != null) {
        Map<JEnumConstant, String> map = new LinkedHashMap<JEnumConstant, String>();
        for (JEnumConstant e : enumType.getEnumConstants()) {
          String name;
          PropertyName annotation = e.getAnnotation(PropertyName.class);
          if (annotation == null) {
            name = e.getName();
          } else {
            name = annotation.value();
          }
          map.put(e, name);
        }
        toReturn.enumMap = map;
      }
View Full Code Here

Examples of com.google.gwt.autobean.shared.AutoBean.PropertyName

   */
  private Object getEnum(Class<?> clazz, String token)
      throws IllegalAccessException {
    for (Field f : clazz.getFields()) {
      String fieldName;
      PropertyName annotation = f.getAnnotation(PropertyName.class);
      if (annotation != null) {
        fieldName = annotation.value();
      } else {
        fieldName = f.getName();
      }
      if (token.equals(fieldName)) {
        f.setAccessible(true);
View Full Code Here

Examples of com.google.gwt.autobean.shared.AutoBean.PropertyName

  /**
   * EnumMap support.
   */
  private Object getToken(Enum<?> e) throws NoSuchFieldException {
    // Remember enum constants are fields
    PropertyName annotation = e.getDeclaringClass().getField(e.name()).getAnnotation(
        PropertyName.class);
    if (annotation != null) {
      return annotation.value();
    } else {
      return e.name();
    }
  }
View Full Code Here

Examples of com.google.gwt.autobean.shared.AutoBean.PropertyName

    private AutoBeanMethod toReturn = new AutoBeanMethod();

    public AutoBeanMethod build() {
      if (toReturn.action.equals(Action.GET)
          || toReturn.action.equals(Action.SET)) {
        PropertyName annotation = toReturn.method.getAnnotation(PropertyName.class);
        if (annotation != null) {
          toReturn.propertyName = annotation.value();
        } else {
          toReturn.propertyName = toReturn.action.inferName(toReturn.method);
        }
      }
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.