フィールドの値を取得する。
@param record レコードオブジェクト。
@return フィールドの値。
@throws IllegalArgumentException レコードのインスタンスがフィールドが定義されているクラスと異なる場合。
@throws SuperCsvReflectionException フィールドの値の取得に失敗した場合。
198586
public Object getValue(final Object record) {
        Objects.requireNonNull(record);
        
        if(!getDeclaredClass().equals(record.getClass())) {
            throw new IllegalArgumentException(String.format("not match record class type. expected=%s. actual=%s, ",
                    type.getName(), record.getClass().getName()));
        }
        
        try {
            return field.get(record);
        } catch (IllegalArgumentException | IllegalAccessException e) {
            throw new SuperCsvReflectionException("fail get field value.", e);
        }
        
    }
548402
public final BELScriptParser.record_return record() throws RecognitionException {
        BELScriptParser.record_return retval = new BELScriptParser.record_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        BELScriptParser.define_namespace_return define_namespace5 = null;

        BELScriptParser.define_annotation_return define_annotation6 = null;

        BELScriptParser.set_annotation_return set_annotation7 = null;

        BELScriptParser.set_document_return set_document8 = null;

        BELScriptParser.set_statement_group_return set_statement_group9 = null;

        BELScriptParser.unset_statement_group_return unset_statement_group10 = null;

        BELScriptParser.unset_return unset11 = null;

        BELScriptParser.statement_return statement12 = null;



        try {
            // BELScript.g:48:7: ( ( define_namespace | define_annotation | set_annotation | set_document | set_statement_group | unset_statement_group | unset | statement ) )
            // BELScript.g:49:5: ( define_namespace | define_annotation | set_annotation | set_document | set_statement_group | unset_statement_group | unset | statement )
            {
            root_0 = (Object)adaptor.nil();

            // BELScript.g:49:5: ( define_namespace | define_annotation | set_annotation | set_document | set_statement_group | unset_statement_group | unset | statement )
            int alt2=8;
            alt2 = dfa2.predict(input);
            switch (alt2) {
                case 1 :
                    // BELScript.g:49:6: define_namespace
                    {
                    pushFollow(FOLLOW_define_namespace_in_record91);
                    define_namespace5=define_namespace();

                    state._fsp--;

                    adaptor.addChild(root_0, define_namespace5.getTree());

                    }
                    break;
                case 2 :
                    // BELScript.g:49:25: define_annotation
                    {
                    pushFollow(FOLLOW_define_annotation_in_record95);
                    define_annotation6=define_annotation();

                    state._fsp--;

                    adaptor.addChild(root_0, define_annotation6.getTree());

                    }
                    break;
                case 3 :
                    // BELScript.g:49:45: set_annotation
                    {
                    pushFollow(FOLLOW_set_annotation_in_record99);
                    set_annotation7=set_annotation();

                    state._fsp--;

                    adaptor.addChild(root_0, set_annotation7.getTree());

                    }
                    break;
                case 4 :
                    // BELScript.g:49:62: set_document
                    {
                    pushFollow(FOLLOW_set_document_in_record103);
                    set_document8=set_document();

                    state._fsp--;

                    adaptor.addChild(root_0, set_document8.getTree());

                    }
                    break;
                case 5 :
                    // BELScript.g:49:77: set_statement_group
                    {
                    pushFollow(FOLLOW_set_statement_group_in_record107);
                    set_statement_group9=set_statement_group();

                    state._fsp--;

                    adaptor.addChild(root_0, set_statement_group9.getTree());

                    }
                    break;
                case 6 :
                    // BELScript.g:49:99: unset_statement_group
                    {
                    pushFollow(FOLLOW_unset_statement_group_in_record111);
                    unset_statement_group10=unset_statement_group();

                    state._fsp--;

                    adaptor.addChild(root_0, unset_statement_group10.getTree());

                    }
                    break;
                case 7 :
                    // BELScript.g:49:123: unset
                    {
                    pushFollow(FOLLOW_unset_in_record115);
                    unset11=unset();

                    state._fsp--;

                    adaptor.addChild(root_0, unset11.getTree());

                    }
                    break;
                case 8 :
                    // BELScript.g:49:131: statement
                    {
                    pushFollow(FOLLOW_statement_in_record119);
                    statement12=statement();

                    state._fsp--;

                    adaptor.addChild(root_0, statement12.getTree());

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

            retval.tree = (Object)adaptor.rulePostProcessing(root_0);
            adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
    	retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);

        }
        finally {
        }
        return retval;
    }
675646
public boolean removeRecord(Rec record)
    {
        if (m_vRecordList == null)
            return false;
        boolean bFlag = m_vRecordList.removeRecord(record);
        if (((Record)record).getRecordOwner() == this)
            ((Record)record).setRecordOwner(null);
        return bFlag;
    }
738623
public void setRecord(Rec record)
    {
        if (m_tableNext != null)
            m_tableNext.setRecord(record);  // Must be synchronized
        super.setRecord(record);
    }
768401
@SuppressWarnings("unchecked")
	public long addRecord(T record) throws IOException {

		if (recordsOutFile == null) {
			
			if (closed) {
				throw new IllegalStateException("The large record handler has been closed.");
			}
			if (recordsReader != null) {
				throw new IllegalStateException("The handler has already switched to sorting.");
			}
			
			LOG.debug("Initializing the large record spilling...");
			
			// initialize the utilities
			{
				final TypeComparator<?>[] keyComps = comparator.getFlatComparators();
				numKeyFields = keyComps.length;
				Object[] keyHolder = new Object[numKeyFields];
				
				comparator.extractKeys(record, keyHolder, 0);
				
				TypeSerializer<?>[] keySers = new TypeSerializer<?>[numKeyFields];
				TypeSerializer<?>[] tupleSers = new TypeSerializer<?>[numKeyFields + 1];
				
				int[] keyPos = new int[numKeyFields];
				
				for (int i = 0; i < numKeyFields; i++) {
					keyPos[i] = i;
					keySers[i] = createSerializer(keyHolder[i], i);
					tupleSers[i] = keySers[i];
				}
				// add the long serializer for the offset
				tupleSers[numKeyFields] = LongSerializer.INSTANCE;
				
				keySerializer = new TupleSerializer<Tuple>((Class<Tuple>) Tuple.getTupleClass(numKeyFields+1), tupleSers);
				keyComparator = new TupleComparator<Tuple>(keyPos, keyComps, keySers);
				
				keySerializerFactory = new RuntimeSerializerFactory<Tuple>(keySerializer, keySerializer.getTupleClass());

				keyTuple = keySerializer.createInstance();
			}
			
			// initialize the spilling
			final int totalNumSegments = memory.size();
			final int segmentsForKeys = (totalNumSegments >= 2*MAX_SEGMENTS_FOR_KEY_SPILLING) ? MAX_SEGMENTS_FOR_KEY_SPILLING : 
				Math.max(MIN_SEGMENTS_FOR_KEY_SPILLING, totalNumSegments - MAX_SEGMENTS_FOR_KEY_SPILLING);
				
			List<MemorySegment> recordsMemory = new ArrayList<MemorySegment>();
			List<MemorySegment> keysMemory = new ArrayList<MemorySegment>();
			
			for (int i = 0; i < segmentsForKeys; i++) {
				keysMemory.add(memory.get(i));
			}
			for (int i = segmentsForKeys; i < totalNumSegments; i++) {
				recordsMemory.add(memory.get(i));
			}
			
			recordsChannel = ioManager.createChannel();
			keysChannel = ioManager.createChannel();
			
			recordsOutFile = new FileChannelOutputView(
					ioManager.createBlockChannelWriter(recordsChannel), memManager,
					recordsMemory, memManager.getPageSize());
			
			keysOutFile = new FileChannelOutputView(
					ioManager.createBlockChannelWriter(keysChannel), memManager,
					keysMemory, memManager.getPageSize());
		}
		
		final long offset = recordsOutFile.getWriteOffset();
		if (offset < 0) {
			throw new RuntimeException("wrong offset");
		}
		
		Object[] keyHolder = new Object[numKeyFields];
		
		comparator.extractKeys(record, keyHolder, 0);
		for (int i = 0; i < numKeyFields; i++) {
			keyTuple.setField(keyHolder[i], i);
		}
		keyTuple.setField(offset, numKeyFields);
		
		keySerializer.serialize(keyTuple, keysOutFile);
		serializer.serialize(record, recordsOutFile);
		
		recordCounter++;
		
		return offset;
	}
1022801
protected boolean writeNextRecord(T record) throws IOException {
		try {
			this.serializer.serialize(record, this.collectingView);
			this.numRecordsInBuffer++;
			return true;
		} catch (EOFException eofex) {
			return false;
		}
	}
547759
protected Logger getSLF4JLogger(LogRecord record) {
        String name = record.getLoggerName();
        if (name == null) {
            name = UNKNOWN_LOGGER_NAME;
        }
        return LoggerFactory.getLogger(name);
    }
95088
public int getFieldTypes(Record record)
    {
        int iFieldTypes = m_iFieldTypes;
        if (iFieldTypes == -1)
        {
            iFieldTypes = BaseBuffer.PHYSICAL_FIELDS;
            if (!record.isAllSelected())
                iFieldTypes = BaseBuffer.DATA_FIELDS; // (Selected excluding virtual)
        }
        return iFieldTypes;
    }
113822
@Override
    public synchronized IChemObject readRecord(int record) throws Exception {
        String buffer = readContent(record);
        if (chemObjectReader == null)
            throw new CDKException("No chemobject reader!");
        else {
            chemObjectReader.setReader(new StringReader(buffer));
            currentRecord = record;
            return processContent();
        }
    }
379098
public int putRawRecordData(Rec record)
    {
        if (this.getNodeType() == BaseMessageRecordDesc.NON_UNIQUE_NODE)
            this.getMessage().createNewNode(this.getFullKey(null));
        return super.putRawRecordData(record);
    }
586670
public int handleGetRawRecordData(Rec record)
    {
        int iErrorCode = Constant.NORMAL_RETURN;
            
        iErrorCode = super.handleGetRawRecordData(record);
        
        if (iErrorCode == Constant.NORMAL_RETURN)
        {
            if (m_messageDataDescChildren != null)
            {
                for (String strKey : m_messageDataDescChildren.keySet())
                {
                    iErrorCode = m_messageDataDescChildren.get(strKey).handleGetRawRecordData(record);
                    if (iErrorCode != Constant.NORMAL_RETURN)
                        break;
                }
            }
        }

        return iErrorCode;
    }
944307
public void writeRecord(byte[] record) throws IOException {
        if (this.debug) {
            System.err.println("WriteRecord: recIdx = " + this.currRecIdx + " blkIdx = " + this.currBlkIdx);
        }

        if (this.outStream == null) {
            throw new IOException("writing to an input buffer");
        }

        if (record.length != this.recordSize) {
            throw new IOException("record to write has length '" + record.length
                + "' which is not the record size of '" + this.recordSize + "'");
        }

        if (this.currRecIdx >= this.recsPerBlock) {
            this.writeBlock();
        }

        System.arraycopy(record, 0, this.blockBuffer, (this.currRecIdx * this.recordSize), this.recordSize);

        this.currRecIdx++;
    }
913900
public int initForMessage(Rec record)
    {
        int iErrorCode = Constant.NORMAL_RETURN;
        if (m_messageDataDescChildren != null)
        {
            for (String strKey : m_messageDataDescChildren.keySet())
            {
                MessageDataDesc messageDataDesc = m_messageDataDescChildren.get(strKey);
                iErrorCode = messageDataDesc.initForMessage(record);
                if (iErrorCode != Constant.NORMAL_RETURN)
                    break;
            }
        }
        return iErrorCode;
    }
193747
public Properties getHeader(RepositoryLogRecord record) {
		if (!headerMap.containsKey(record)) {
			throw new IllegalArgumentException("Record was not return by an iterator over this instance");
		}
		return headerMap.get(record);
	}
927511
@Override
	public void writeRecord(Record record) throws IOException {
		int numRecFields = record.getNumFields();
		int readPos;

		for (int i = 0; i < this.numFields; i++) {
			readPos = this.recordPositions[i];
			if (readPos < numRecFields) {
				Value v = record.getField(this.recordPositions[i], this.classes[i]);
				if (v != null) {
					if (i != 0) {
						this.wrt.write(this.fieldDelimiter);
					}
					this.wrt.write(v.toString());
				} else {
					if (this.lenient) {
						if (i != 0) {
							this.wrt.write(this.fieldDelimiter);
						}
					} else {
						throw new RuntimeException("Cannot serialize record with <null> value at position: " + readPos);
					}
				}

			} else {
				if (this.lenient) {
					if (i != 0) {
						this.wrt.write(this.fieldDelimiter);
					}
				} else {
					throw new RuntimeException("Cannot serialize record with out field at position: " + readPos);
				}
			}

		}

		// add the record delimiter
		this.wrt.write(this.recordDelimiter);
	}
131289
public List evaluate(Record record) {
    // fast path (not functionally necessary):
    if (fields.size() == 1) {
      Object first = fields.get(0);
      if (first instanceof String) {
        return Collections.singletonList(first);
      } else {
        String ref = ((Field) first).getName();
        if (ref.length() != 0) {
          List resolvedValues = record.get(ref);
          return resolvedValues;
        }
      }
    }

    // slow path:
    ArrayList<Object> results = new ArrayList<Object>(1);
    evaluate2(0, record, new StringBuilder(), results);
    return results;
  }
730196
public int getRawRecordData(Rec record)
    {
        Field fieldInfo = record.getField(this.getKey());
        if (fieldInfo != null)
            return this.getRawFieldData(fieldInfo);
        else
            return Constant.NORMAL_RETURN;
    }