blob: 86d4a7c9e6e7aa8b5531c1b623b0993cd104f7c1 [file] [log] [blame]
limpbizkit03b81a62009-03-18 05:34:39 +00001/**
2 * Copyright (C) 2009 Google Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
limpbizkit5ae41eb2009-06-06 17:51:27 +000017package com.google.inject.internal;
limpbizkit03b81a62009-03-18 05:34:39 +000018
limpbizkitee792462009-04-08 23:48:49 +000019import com.google.inject.spi.TypeListenerBinding;
limpbizkit03b81a62009-03-18 05:34:39 +000020
21/**
limpbizkit5ae41eb2009-06-06 17:51:27 +000022 * Handles {@code Binder#bindListener} commands.
limpbizkit03b81a62009-03-18 05:34:39 +000023 *
24 * @author jessewilson@google.com (Jesse Wilson)
25 */
limpbizkit5ae41eb2009-06-06 17:51:27 +000026final class TypeListenerBindingProcessor extends AbstractProcessor {
limpbizkit03b81a62009-03-18 05:34:39 +000027
limpbizkitee792462009-04-08 23:48:49 +000028 TypeListenerBindingProcessor(Errors errors) {
limpbizkit03b81a62009-03-18 05:34:39 +000029 super(errors);
30 }
31
limpbizkitee792462009-04-08 23:48:49 +000032 @Override public Boolean visit(TypeListenerBinding binding) {
33 injector.state.addTypeListener(binding);
limpbizkit03b81a62009-03-18 05:34:39 +000034 return true;
35 }
36}