test_class.file: flink-contrib/flink-storm/src/test/java/org/apache/flink/storm/api/FlinkOutputFieldsDeclarerTest.java
test_class.identifier: FlinkOutputFieldsDeclarerTest
test_class.superclass: extends AbstractTest
test_case.body: @Test
  	public void testNull() {
  		Assert.assertNull(new FlinkOutputFieldsDeclarer().getOutputType(null));
  	}
test_case.class_method_signature: FlinkOutputFieldsDeclarerTest.testNull()
test_case.full_signature: @Test public void testNull()
test_case.identifier: testNull
test_case.invocations: assertNull getOutputType
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNull()
focal_class.declarator: outputStreams = new HashMap<String, Fields>()
focal_class.modifier: final
focal_class.original_string: final HashMap<String, Fields> outputStreams = new HashMap<String, Fields>();
focal_class.type: HashMap<String, Fields>
focal_class.var_name: outputStreams
focal_class.file: flink-contrib/flink-storm/src/main/java/org/apache/flink/storm/api/FlinkOutputFieldsDeclarer.java
focal_class.identifier: FlinkOutputFieldsDeclarer
focal_class.interfaces: implements OutputFieldsDeclarer
focal_class.class_method_signature: FlinkOutputFieldsDeclarer.declare(final Fields fields)
focal_class.full_signature: @Override public void declare(final Fields fields)
focal_class.identifier: declare
focal_class.modifiers: @Override public
focal_class.parameters: (final Fields fields)
focal_class.return: void
focal_class.signature: void declare(final Fields fields)
focal_class.class_method_signature: FlinkOutputFieldsDeclarer.declare(final boolean direct, final Fields fields)
focal_class.full_signature: @Override public void declare(final boolean direct, final Fields fields)
focal_class.identifier: declare
focal_class.modifiers: @Override public
focal_class.parameters: (final boolean direct, final Fields fields)
focal_class.return: void
focal_class.signature: void declare(final boolean direct, final Fields fields)
focal_class.class_method_signature: FlinkOutputFieldsDeclarer.declareStream(final String streamId, final Fields fields)
focal_class.full_signature: @Override public void declareStream(final String streamId, final Fields fields)
focal_class.identifier: declareStream
focal_class.modifiers: @Override public
focal_class.parameters: (final String streamId, final Fields fields)
focal_class.return: void
focal_class.signature: void declareStream(final String streamId, final Fields fields)
focal_class.class_method_signature: FlinkOutputFieldsDeclarer.declareStream(final String streamId, final boolean direct, final Fields fields)
focal_class.full_signature: @Override public void declareStream(final String streamId, final boolean direct, final Fields fields)
focal_class.identifier: declareStream
focal_class.modifiers: @Override public
focal_class.parameters: (final String streamId, final boolean direct, final Fields fields)
focal_class.return: void
focal_class.signature: void declareStream(final String streamId, final boolean direct, final Fields fields)
focal_class.class_method_signature: FlinkOutputFieldsDeclarer.getOutputType(final String streamId)
focal_class.full_signature:  TypeInformation<Tuple> getOutputType(final String streamId)
focal_class.identifier: getOutputType
focal_class.parameters: (final String streamId)
focal_class.return: TypeInformation<Tuple>
focal_class.signature: TypeInformation<Tuple> getOutputType(final String streamId)
focal_class.class_method_signature: FlinkOutputFieldsDeclarer.getGroupingFieldIndexes(final String streamId, final List<String> groupingFields)
focal_class.full_signature:  int[] getGroupingFieldIndexes(final String streamId, final List<String> groupingFields)
focal_class.identifier: getGroupingFieldIndexes
focal_class.parameters: (final String streamId, final List<String> groupingFields)
focal_class.return: int[]
focal_class.signature: int[] getGroupingFieldIndexes(final String streamId, final List<String> groupingFields)
focal_method.body: TypeInformation<Tuple> getOutputType(final String streamId) throws IllegalArgumentException {
  		if (streamId == null) {
  			return null;
  		}
  
  		Fields outputSchema = this.outputStreams.get(streamId);
  		if (outputSchema == null) {
  			throw new IllegalArgumentException("Stream with ID '" + streamId
  					+ "' was not declared.");
  		}
  
  		Tuple t;
  		final int numberOfAttributes = outputSchema.size();
  
  		if (numberOfAttributes <= 24) {
  			try {
  				t = Tuple.getTupleClass(numberOfAttributes + 1).newInstance();
  			} catch (final InstantiationException e) {
  				throw new RuntimeException(e);
  			} catch (final IllegalAccessException e) {
  				throw new RuntimeException(e);
  			}
  		} else {
  			throw new IllegalArgumentException("Flink supports only a maximum number of 24 attributes");
  		}
  
  		// TODO: declare only key fields as DefaultComparable
  		for (int i = 0; i < numberOfAttributes + 1; ++i) {
  			t.setField(new DefaultComparable(), i);
  		}
  
  		return TypeExtractor.getForObject(t);
  	}
focal_method.class_method_signature: FlinkOutputFieldsDeclarer.getOutputType(final String streamId)
focal_method.full_signature:  TypeInformation<Tuple> getOutputType(final String streamId)
focal_method.identifier: getOutputType
focal_method.invocations: get size newInstance getTupleClass setField getForObject
focal_method.parameters: (final String streamId)
focal_method.return: TypeInformation<Tuple>
focal_method.signature: TypeInformation<Tuple> getOutputType(final String streamId)