Examples of FieldPropertyInfo


Examples of org.jboss.beans.info.plugins.FieldPropertyInfo

         {
            String name = field.getName();
            PropertyInfo pi = properties.get(name);
            if (pi == null)
            {
               properties.put(name, new FieldPropertyInfo(field));
            }
            else if (pi.isReadable() == false)
            {
               properties.put(name, new SetterAndFieldPropertyInfo(pi, field));
            }
View Full Code Here

Examples of org.modelmapper.internal.PropertyInfoImpl.FieldPropertyInfo

   * Returns a FieldPropertyInfo instance for the given field.
   */
  static synchronized FieldPropertyInfo fieldPropertyFor(Class<?> type, Field field,
      Configuration configuration, String name) {
    Integer hashCode = hashCodeFor(type, field.getName(), configuration);
    FieldPropertyInfo fieldPropertyInfo = (FieldPropertyInfo) cache.get(hashCode);
    if (fieldPropertyInfo == null) {
      fieldPropertyInfo = new FieldPropertyInfo(type, field, name);
      cache.put(hashCode, fieldPropertyInfo);
    }

    return fieldPropertyInfo;
  }
View Full Code Here

Examples of org.modelmapper.internal.PropertyInfoImpl.FieldPropertyInfo

        if (proxy == null) {
          proxy = createProxy(accessor.getType());
          interceptor.methodProxies.put(methodName, proxy);
        }
      } else if (accessor instanceof FieldPropertyInfo) {
        FieldPropertyInfo field = (FieldPropertyInfo) accessor;
        Object nextProxy = field.getValue(proxy);
        if (nextProxy == null) {
          nextProxy = createProxy(field.getType());
          field.setValue(proxy, nextProxy);
        }
        proxy = nextProxy;
      }
    }
  }
View Full Code Here

Examples of org.modelmapper.internal.PropertyInfoImpl.FieldPropertyInfo

  enum Color {
    Red, Blue
  }

  MappingImpl mapping(final String arg) throws Exception {
    Mutator mutator = new FieldPropertyInfo(ArrayList.class,
        ArrayList.class.getDeclaredField("size"), arg) {
    };
    return new MappingImpl(Arrays.asList(mutator)) {
      public String toString() {
        return arg;
View Full Code Here

Examples of org.modelmapper.internal.PropertyInfoImpl.FieldPropertyInfo

    private void recordDestinationField(Class<?> type, Field field) {
      assertNotFinal(field);
      if (PropertyInfoResolver.FIELDS.isValid(field)) {
        String propertyName = config.getDestinationNameTransformer().transform(field.getName(),
            NameableType.FIELD);
        FieldPropertyInfo propertyInfo = PropertyInfoRegistry.fieldPropertyFor(type, field, config,
            propertyName);
        mapping.destinationAccessors.add(propertyInfo);
        mapping.destinationMutators.add(propertyInfo);
      } else
        errors.invalidDestinationField(field);
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.