// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java
// @Singleton
// public class DynamicClassProvider implements Provider<Object> {
// 
//     private final Injector injector;
// 
//     @Inject
//     public DynamicClassProvider(final Injector injector) {
//         this.injector = injector;
//     }
// 
//     @Override
//     @SuppressWarnings({"PMD.PreserveStackTrace", "PMD.NullAssignment"})
//     public Object get() {
//         try (InternalContext context = ((InjectorImpl) injector).enterContext()) {
//             // check if (possibly) child context contains anchor bean definition
//             final boolean hasAnchor = injector.getExistingBinding(Key.get(AnchorBean.class)) != null;
//             final Class<?> abstractType = context.getDependency().getKey().getTypeLiteral().getRawType();
//             final Class<?> generatedType = DynamicClassGenerator.generate(abstractType, getScopeAnnotation(),
//                     hasAnchor ? AnchorBean.class : null);
//             return injector.getInstance(generatedType);
//         }
//     }
// 
//     /**
//      * Override it to specify different annotation. By default, no annotation specified which will implicitly lead
//      * to default prototype scope.
//      *
//      * @return scope annotation which should be applied to generated class
//      */
//     protected Class<? extends Annotation> getScopeAnnotation() {
//         return null;
//     }
// }
// 
// Path: src/test/java/ru/vyarus/guice/ext/generator/support/ProvidedInterfaceBean.java
// @ScopeAnnotation(Singleton.class)
// @ProvidedBy(DynamicClassProvider.class)
// public interface ProvidedInterfaceBean {
// 
//     @CustomAop
//     String hello();
// 
//     String badMethod();
// }


import com.google.inject.Inject;
import com.google.inject.ProvidedBy;
import com.google.inject.internal.DynamicClassProvider;
import ru.vyarus.guice.ext.generator.support.ProvidedInterfaceBean;
package ru.vyarus.guice.ext.generator.support.ctor;


/**
 * @author Vyacheslav Rusakov
 * @since 10.12.2014
 */
@ProvidedBy(DynamicClassProvider.class)
public abstract class CustomConstructorBean {

// Path: src/main/java/com/google/inject/internal/DynamicClassProvider.java
// @Singleton
// public class DynamicClassProvider implements Provider<Object> {
// 
//     private final Injector injector;
// 
//     @Inject
//     public DynamicClassProvider(final Injector injector) {
//         this.injector = injector;
//     }
// 
//     @Override
//     @SuppressWarnings({"PMD.PreserveStackTrace", "PMD.NullAssignment"})
//     public Object get() {
//         try (InternalContext context = ((InjectorImpl) injector).enterContext()) {
//             // check if (possibly) child context contains anchor bean definition
//             final boolean hasAnchor = injector.getExistingBinding(Key.get(AnchorBean.class)) != null;
//             final Class<?> abstractType = context.getDependency().getKey().getTypeLiteral().getRawType();
//             final Class<?> generatedType = DynamicClassGenerator.generate(abstractType, getScopeAnnotation(),
//                     hasAnchor ? AnchorBean.class : null);
//             return injector.getInstance(generatedType);
//         }
//     }
// 
//     /**
//      * Override it to specify different annotation. By default, no annotation specified which will implicitly lead
//      * to default prototype scope.
//      *
//      * @return scope annotation which should be applied to generated class
//      */
//     protected Class<? extends Annotation> getScopeAnnotation() {
//         return null;
//     }
// }
// 
// Path: src/test/java/ru/vyarus/guice/ext/generator/support/ProvidedInterfaceBean.java
// @ScopeAnnotation(Singleton.class)
// @ProvidedBy(DynamicClassProvider.class)
// public interface ProvidedInterfaceBean {
// 
//     @CustomAop
//     String hello();
// 
//     String badMethod();
// }


// Path: src/test/java/ru/vyarus/guice/ext/generator/support/ctor/CustomConstructorBean.java
import com.google.inject.Inject;
import com.google.inject.ProvidedBy;
import com.google.inject.internal.DynamicClassProvider;
import ru.vyarus.guice.ext.generator.support.ProvidedInterfaceBean;

package ru.vyarus.guice.ext.generator.support.ctor;


/**
 * @author Vyacheslav Rusakov
 * @since 10.12.2014
 */
@ProvidedBy(DynamicClassProvider.class)
public abstract class CustomConstructorBean {

    ProvidedInterfaceBean bean;