Constructor.
@param data The physical data to initialize this buffer to (optional).
@param iFieldTypes The default field types to cache.
350292
public void init(Object data, int iFieldsTypes)
    {
        if (data == null)
            this.clearBuffer();
        else
        {
            m_iHeaderCount = 0;
            this.setPhysicalData(data);
            this.resetPosition();
        }
        m_iFieldsTypes = iFieldsTypes;      // Default - assume all fields (call bufferToFields(xxx, false) if not)
    }
650647
public static void decodeFieldData(BaseField field, String string)
    {
        if ((string == null) || (string.length() == 0))
            return;
        byte[] ba = Base64.decode(string.toCharArray());
        InputStream is = new ByteArrayInputStream(ba);
        DataInputStream daIn = new DataInputStream(is);
        field.read(daIn, false);
    }
1325416
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, SEQUENCE, 10, null, new Integer(1000));
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, METHOD_NAME, 40, null, null);
        field = new FieldInfo(this, LOGIC_DESCRIPTION, 32000, null, null);
        field = new FieldInfo(this, METHOD_RETURNS, 255, null, null);
        field = new FieldInfo(this, METHOD_INTERFACE, 255, null, null);
        field = new FieldInfo(this, METHOD_CLASS_NAME, 40, null, null);
        field = new FieldInfo(this, LOGIC_SOURCE, 32000, null, null);
        field = new FieldInfo(this, LOGIC_THROWS, 255, null, null);
        field = new FieldInfo(this, PROTECTION, 60, null, null);
        field = new FieldInfo(this, COPY_FROM, 40, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
208210
@Override
  public Converter<Schema, JdbcEntrySchema, GenericRecord, JdbcEntryData> init(WorkUnitState workUnit) {
    String avroToJdbcFieldsPairJsonStr = workUnit.getProp(ConfigurationKeys.CONVERTER_AVRO_JDBC_ENTRY_FIELDS_PAIRS);
    if (!StringUtils.isEmpty(avroToJdbcFieldsPairJsonStr)) {
      if (!this.avroToJdbcColPairs.isPresent()) {
        ImmutableMap.Builder<String, String> avroToJdbcBuilder = ImmutableMap.builder();
        ImmutableMap.Builder<String, String> jdbcToAvroBuilder = ImmutableMap.builder();

        JsonObject json = new JsonParser().parse(avroToJdbcFieldsPairJsonStr).getAsJsonObject();
        for (Map.Entry<String, JsonElement> entry : json.entrySet()) {
          if (!entry.getValue().isJsonPrimitive()) {
            throw new IllegalArgumentException("Json value should be a primitive String. "
                + ConfigurationKeys.CONVERTER_AVRO_JDBC_ENTRY_FIELDS_PAIRS + " : " + avroToJdbcFieldsPairJsonStr);
          }
          avroToJdbcBuilder.put(entry.getKey(), entry.getValue().getAsString());
          jdbcToAvroBuilder.put(entry.getValue().getAsString(), entry.getKey());
        }
        this.avroToJdbcColPairs = Optional.of((Map<String, String>) avroToJdbcBuilder.build());
      }
    }
    return this;
  }
490742
private void writeFields(String objectName, FieldContainer container, FieldType[] fields) throws IOException
   {
      m_writer.writeStartObject(objectName);
      for (FieldType field : fields)
      {
         Object value = container.getCurrentValue(field);
         if (value != null)
         {
            writeField(field, value);
         }
      }
      m_writer.writeEndObject();
   }
1095167
public void addField(String scope, String type, String name, String defaultValue) {
        fields.put(name, new FieldCode(scope, name, type, defaultValue));
    }
773144
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, KEY_FILENAME, 40, null, null);
        field = new FieldInfo(this, KEY_NUMBER, 2, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, KEY_FIELD_1, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_2, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_3, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_4, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_5, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_6, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_7, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_8, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_9, 40, null, null);
        field = new FieldInfo(this, KEY_NAME, 40, null, null);
        field = new FieldInfo(this, KEY_TYPE, 1, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }
604324
def add_fields(self, **fields):
        """"""
        self.__class__ = type(self.__class__.__name__,
                            (self.__class__,), fields)
        for k, v in fields.items():
            v.init_inst(self)
1306134
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, NAME, 30, null, null);
        field = new FieldInfo(this, DESCRIPTION, 30, null, null);
        field = new FieldInfo(this, VERSION, 20, null, null);
        field = new FieldInfo(this, START_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, END_ID, 10, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, BASE_DATABASE, 30, null, null);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
1237515
def init_fields(self):
        

        if self.class_dont_cache.get(self.__class__, False):
            self.do_init_fields(self.fields_desc)
        else:
            self.do_init_cached_fields()
1348095
public void setDataType(com.google.api.ads.admanager.axis.v201902.CustomFieldDataType dataType) {
        this.dataType = dataType;
    }
728530
public Constructor<?> getDefaultConstructorForFieldType(final Type fieldTypeFullyResolved,
            final ClassFieldCache classFieldCache) {
        if (!isTypeVariable) {
            return defaultConstructorForFieldType;
        } else {
            final Class<?> fieldRawTypeFullyResolved = JSONUtils.getRawType(fieldTypeFullyResolved);
            return classFieldCache.getDefaultConstructorForConcreteTypeOf(fieldRawTypeFullyResolved);
        }
    }
1097994
private void writeField(String fieldName, DataType fieldType, Object value) throws IOException
   {
      switch (fieldType)
      {
         case INTEGER:
         {
            writeIntegerField(fieldName, value);
            break;
         }

         case PERCENTAGE:
         case CURRENCY:
         case NUMERIC:
         case UNITS:
         {
            writeDoubleField(fieldName, value);
            break;
         }

         case BOOLEAN:
         {
            writeBooleanField(fieldName, value);
            break;
         }

         case WORK:
         case DURATION:
         {
            writeDurationField(fieldName, value);
            break;
         }

         case DATE:
         {
            writeDateField(fieldName, value);
            break;
         }

         case TIME_UNITS:
         {
            writeTimeUnitsField(fieldName, value);
            break;
         }

         case PRIORITY:
         {
            writePriorityField(fieldName, value);
            break;
         }

         case RELATION_LIST:
         {
            writeRelationList(fieldName, value);
            break;
         }

         case MAP:
         {
            writeMap(fieldName, value);
            break;
         }

         case BINARY:
         {
            // Don't write binary data
            break;
         }

         default:
         {
            writeStringField(fieldName, value);
            break;
         }
      }
   }
747147
public void addField(String fieldName, String type, short flags,
        int value) {
        short fieldNameIndex = itsConstantPool.addUtf8(fieldName);
        short typeIndex = itsConstantPool.addUtf8(type);
        ClassFileField field = new ClassFileField(fieldNameIndex, typeIndex,
            flags);
        field.setAttributes(itsConstantPool.addUtf8("ConstantValue"),
            (short) 0,
            (short) 0,
            itsConstantPool.addConstant(value));
        itsFields.add(field);
    }
243883
@Override
    public void setData(FieldContent data) {
        // allow setting in field once only.
        // cannot have multiple sources for one @In !
        if (this.data != null) {
            throw new ComponentException("Attempt to set @In field twice: " + comp + "." + field.getName());
        }
        this.data = data;
    }
181806
public void init(BaseField field, BaseField fldDest, BaseField fldSource)
    {
        super.init(field, fldDest, fldSource, false, false, false);
    }
23516
public void init(BaseField field, BaseField fldTarget, boolean bSetModified)
    {
        super.init(field);
        m_fldTarget = fldTarget;
        m_bSetModified = bSetModified;

        this.setRespondsToMode(DBConstants.INIT_MOVE, false);
        this.setRespondsToMode(DBConstants.READ_MOVE, false);
    }