AbstractFieldGenerator { protected PreanalyzedToken createPreanalyzedToken(String term, int start, int end, int posIncr, byte[] payload, String type, int flags) { long time = System.currentTimeMillis(); PreanalyzedToken token = new PreanalyzedToken(); token.term = term; if (start >= 0) token.start = start; if (end >= 0) token.end = end; if (posIncr != 1) token.positionIncrement = posIncr; if (null != payload) ; if (null != type) token.type = type; if (flags != 0) token.flags = Integer.toHexString(flags); time = System.currentTimeMillis() - time; tokenMapCreationTime += time; return token; } @Deprecated  AbstractFieldGenerator(String fieldname); @Deprecated  AbstractFieldGenerator(String fieldname, FilterRegistry filterRegistry);  AbstractFieldGenerator();  AbstractFieldGenerator(FilterRegistry filterRegistry); void setFilterRegistry(FilterRegistry filterRegistry); @SuppressWarnings("unchecked") List<T> getTokensForAnnotationIndexes(FeaturePathSets featurePathSets,
			Filter filterForField, boolean sort, Class<T> tokenClass, AnnotationFS coveringAnnotation,
			DistributedField<? extends IToken> distributedFields, JCas aJCas); @SuppressWarnings("unchecked") T createRawFieldValueForString(String input, Filter f); ArrayFieldValue createRawArrayFieldValue(Collection<T> fieldValues); @SuppressWarnings("unchecked") ArrayFieldValue createRawArrayFieldValue(Collection<T> fieldValues, Filter filter); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fs, String featurePath, Filter filter,
			Filter overallFilter); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fs, String featurePath, Filter filter); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fs, String featurePath); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] a, String[] featurePaths); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] a, String[] featurePaths,
			Filter[] filters); ArrayFieldValue createRawFieldValueForAnnotations(FeatureStructure[] fss, String[] featurePaths,
			Filter[] filters, Filter overallFilter); ArrayFieldValue createRawFieldValueForAnnotation(FeatureStructure annotation, String[] featurePaths,
			Filter[] filters); IFieldValue createRawFieldValueForAnnotation(FeatureStructure fs, String featurePath, Filter f); PreanalyzedFieldValue createPreanalyzedFieldValue(String stringValue, List<PreanalyzedToken> tokens); PreanalyzedToken createPreanalyzedTokenInTokenSequence(List<?> fieldValueList, String term, int start,
			int end, int posIncr, byte[] payload, String type, int flags); String getFieldname(); void setFieldname(String fieldname); void addFieldSubgenerator(FieldGenerator subgenerator); FieldGenerator getFieldSubgenerator(Class<? extends FieldGenerator> generatorClass); void addInnerDocumentGenerator(FieldValueGenerator subgenerator); FieldValueGenerator getInnerDocumentGenerator(Class<? extends FieldValueGenerator> generatorClass); @Deprecated void addSubgeneratorFeatureStructure(Object key, TOP featureStructure); Map<Class<?>, List<TOP>> getSubgeneratorFS();  }
@Test public void testCreatePreanalyzedToken() { PreanalyzedToken token = createPreanalyzedToken("testterm", 0, 1, 2, null, "atype", 8); assertEquals("testterm", token.term); assertEquals(0, token.start); assertEquals(1, token.end); assertEquals(2, token.positionIncrement); assertNull(token.payload); assertEquals("atype", token.type); assertEquals("8", token.flags); }