shaded.com.google.inject.internal.State Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-cloud-contract-shade Show documentation
Show all versions of spring-cloud-contract-shade Show documentation
Spring Cloud Contract Shaded Dependencies
/*
* Copyright (C) 2008 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package shaded.shaded.com.google.inject.internal;
import shaded.shaded.com.google.common.collect.ImmutableList;
import shaded.shaded.com.google.common.collect.ImmutableMap;
import shaded.shaded.com.google.common.collect.ImmutableSet;
import shaded.shaded.com.google.inject.Binding;
import shaded.shaded.com.google.inject.Key;
import shaded.shaded.com.google.inject.Scope;
import shaded.shaded.com.google.inject.TypeLiteral;
import shaded.shaded.com.google.inject.spi.ModuleAnnotatedMethodScannerBinding;
import shaded.shaded.com.google.inject.spi.ProvisionListenerBinding;
import shaded.shaded.com.google.inject.spi.ScopeBinding;
import shaded.shaded.com.google.inject.spi.TypeConverterBinding;
import shaded.shaded.com.google.inject.spi.TypeListenerBinding;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* The inheritable data within an injector. This class is intended to allow parent and local
* injector data to be accessed as a unit.
*
* @author [email protected] (Jesse Wilson)
*/
interface State {
static final State NONE =
new State() {
@Override
public State parent() {
throw new UnsupportedOperationException();
}
@Override
public BindingImpl getExplicitBinding(Key key) {
return null;
}
@Override
public Map, Binding>> getExplicitBindingsThisLevel() {
throw new UnsupportedOperationException();
}
@Override
public void putBinding(Key> key, BindingImpl> binding) {
throw new UnsupportedOperationException();
}
@Override
public ScopeBinding getScopeBinding(Class extends Annotation> scopingAnnotation) {
return null;
}
@Override
public void putScopeBinding(
Class extends Annotation> annotationType, ScopeBinding scope) {
throw new UnsupportedOperationException();
}
@Override
public void addConverter(TypeConverterBinding typeConverterBinding) {
throw new UnsupportedOperationException();
}
@Override
public TypeConverterBinding getConverter(
String stringValue, TypeLiteral> type, Errors errors, Object source) {
throw new UnsupportedOperationException();
}
@Override
public Iterable getConvertersThisLevel() {
return ImmutableSet.of();
}
/*if[AOP]*/
@Override
public void addMethodAspect(MethodAspect methodAspect) {
throw new UnsupportedOperationException();
}
@Override
public ImmutableList getMethodAspects() {
return ImmutableList.of();
}
/*end[AOP]*/
@Override
public void addTypeListener(TypeListenerBinding typeListenerBinding) {
throw new UnsupportedOperationException();
}
@Override
public List getTypeListenerBindings() {
return ImmutableList.of();
}
@Override
public void addProvisionListener(ProvisionListenerBinding provisionListenerBinding) {
throw new UnsupportedOperationException();
}
@Override
public List getProvisionListenerBindings() {
return ImmutableList.of();
}
@Override
public void addScanner(ModuleAnnotatedMethodScannerBinding scanner) {
throw new UnsupportedOperationException();
}
@Override
public List getScannerBindings() {
return ImmutableList.of();
}
@Override
public void blacklist(Key> key, State state, Object source) {}
@Override
public boolean isBlacklisted(Key> key) {
return true;
}
@Override
public Set