@Test public void exampleUsage() { binderUnderTest.bind(TestUtils.FUNCTION_TYPE, new SanityClass()); assertThat(state.boundNames, hasItems("name", "last")); }
public BoundState bind(FunctionType functionType, @Nullable Object instance) { List<PersistedValue<Object>> values = PersistedValues.findReflectively(instance); for (PersistedValue<Object> persistedValue : values) { Accessor<Object> accessor = state.createFlinkStateAccessor(functionType, persistedValue); ApiExtension.setPersistedValueAccessor(persistedValue, accessor); } return new BoundState(values); }
StateBinder { public BoundState bind(FunctionType functionType, @Nullable Object instance) { List<PersistedValue<Object>> values = PersistedValues.findReflectively(instance); for (PersistedValue<Object> persistedValue : values) { Accessor<Object> accessor = state.createFlinkStateAccessor(functionType, persistedValue); ApiExtension.setPersistedValueAccessor(persistedValue, accessor); } return new BoundState(values); } }
StateBinder { public BoundState bind(FunctionType functionType, @Nullable Object instance) { List<PersistedValue<Object>> values = PersistedValues.findReflectively(instance); for (PersistedValue<Object> persistedValue : values) { Accessor<Object> accessor = state.createFlinkStateAccessor(functionType, persistedValue); ApiExtension.setPersistedValueAccessor(persistedValue, accessor); } return new BoundState(values); } @Inject  StateBinder(@Label("state") State state); }
StateBinder { public BoundState bind(FunctionType functionType, @Nullable Object instance) { List<PersistedValue<Object>> values = PersistedValues.findReflectively(instance); for (PersistedValue<Object> persistedValue : values) { Accessor<Object> accessor = state.createFlinkStateAccessor(functionType, persistedValue); ApiExtension.setPersistedValueAccessor(persistedValue, accessor); } return new BoundState(values); } @Inject  StateBinder(@Label("state") State state); BoundState bind(FunctionType functionType, @Nullable Object instance); }
StateBinder { public BoundState bind(FunctionType functionType, @Nullable Object instance) { List<PersistedValue<Object>> values = PersistedValues.findReflectively(instance); for (PersistedValue<Object> persistedValue : values) { Accessor<Object> accessor = state.createFlinkStateAccessor(functionType, persistedValue); ApiExtension.setPersistedValueAccessor(persistedValue, accessor); } return new BoundState(values); } @Inject  StateBinder(@Label("state") State state); BoundState bind(FunctionType functionType, @Nullable Object instance);  }