1aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins/** 2aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * Copyright (C) 2008 Google Inc. 3aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * 4aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * Licensed under the Apache License, Version 2.0 (the "License"); 5aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * you may not use this file except in compliance with the License. 6aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * You may obtain a copy of the License at 7aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * 8aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * http://www.apache.org/licenses/LICENSE-2.0 9aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * 10aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * Unless required by applicable law or agreed to in writing, software 11aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * distributed under the License is distributed on an "AS IS" BASIS, 12aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * See the License for the specific language governing permissions and 14aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * limitations under the License. 15aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins */ 16aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins 17aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkinspackage com.google.inject.grapher.graphviz; 18aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins 19aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkinsimport com.google.inject.AbstractModule; 20aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkinsimport com.google.inject.grapher.NameFactory; 21aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkinsimport com.google.inject.grapher.ShortNameFactory; 22aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins 23aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins/** 24b71955639ab617e0a4115b1439c8b9982227a018sberlin * Module that provides classes needed by {@link GraphvizGrapher}. 25aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * 26aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins * @author phopkins@gmail.com (Pete Hopkins) 27aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins */ 28aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkinspublic class GraphvizModule extends AbstractModule { 29b71955639ab617e0a4115b1439c8b9982227a018sberlin @Override protected void configure() { 30b71955639ab617e0a4115b1439c8b9982227a018sberlin bind(NameFactory.class) 31b71955639ab617e0a4115b1439c8b9982227a018sberlin .annotatedWith(Graphviz.class) 32b71955639ab617e0a4115b1439c8b9982227a018sberlin .to(ShortNameFactory.class); 33b71955639ab617e0a4115b1439c8b9982227a018sberlin bind(PortIdFactory.class) 34b71955639ab617e0a4115b1439c8b9982227a018sberlin .annotatedWith(Graphviz.class) 35b71955639ab617e0a4115b1439c8b9982227a018sberlin .to(PortIdFactoryImpl.class); 36aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins } 37aff72e051a38af75e8a6bce59d1a9a4b760d914bphopkins} 38