@Override protected ClassSpaceVisitor visitor( final Binder binder ) { return new NexusTypeVisitor( new NexusTypeBinder( binder, classNames, descriptors ) ); } }
@Override public void visit( final String name, final Object value ) { getComponentVisitor().visit( "hint", value ); } }
@Override public void visit( final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces ) { final String clazz = name.replace( '/', '.' ); nexusTypeListener.hear( clazz ); if ( ( access & ( Opcodes.ACC_ABSTRACT | Opcodes.ACC_INTERFACE | Opcodes.ACC_SYNTHETIC ) ) == 0 ) { scanForNexusMarkers( clazz, interfaces ); } plexusTypeVisitor.visit( version, access, name, signature, superName, interfaces ); }
public PlexusBeanSource configure( final Binder binder ) { if ( null != space ) { final NexusTypeBinder nexusBinder = new NexusTypeBinder( binder, classNames, descriptors ); new ClassSpaceScanner( space ).accept( new NexusTypeVisitor( nexusBinder ) ); } return new NexusAnnotatedBeanSource( variables ); }
@Override public void visit( final String name, final Object value ) { getComponentVisitor().visit( "hint", value ); } }
@Override public void visit( final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces ) { final String clazz = name.replace( '/', '.' ); nexusTypeListener.hear( clazz ); if ( ( access & ( Opcodes.ACC_ABSTRACT | Opcodes.ACC_INTERFACE | Opcodes.ACC_SYNTHETIC ) ) == 0 ) { scanForNexusMarkers( clazz, interfaces ); } plexusTypeVisitor.visit( version, access, name, signature, superName, interfaces ); }
public PlexusBeanSource configure( final Binder binder ) { if ( null != space ) { final NexusTypeBinder nexusBinder = new NexusTypeBinder( binder, classNames, descriptors ); new ClassSpaceScanner( space ).accept( new NexusTypeVisitor( nexusBinder ) ); } return new NexusAnnotatedBeanSource( variables ); }
private void scanForNexusMarkers( final String clazz, final String[] interfaces ) { for ( final String i : interfaces ) { nexusType = nexusTypeCache.nexusType( space, i ); if ( nexusType.isComponent() ) { final AnnotationVisitor componentVisitor = getComponentVisitor(); componentVisitor.visit( "role", Type.getObjectType( i ) ); if ( nexusType != MarkedNexusTypes.MANAGED && nexusType != MarkedNexusTypes.MANAGED_SINGLETON ) { componentVisitor.visit( "hint", clazz ); } if ( !nexusType.isSingleton() ) { componentVisitor.visit( "instantiationStrategy", Strategies.PER_LOOKUP ); } break; } } }
private void scanForNexusMarkers( final String clazz, final String[] interfaces ) { for ( final String i : interfaces ) { nexusType = nexusTypeCache.nexusType( space, i ); if ( nexusType.isComponent() ) { final AnnotationVisitor componentVisitor = getComponentVisitor(); componentVisitor.visit( "role", Type.getObjectType( i ) ); if ( nexusType != MarkedNexusTypes.MANAGED && nexusType != MarkedNexusTypes.MANAGED_SINGLETON ) { componentVisitor.visit( "hint", clazz ); } if ( !nexusType.isSingleton() ) { componentVisitor.visit( "instantiationStrategy", Strategies.PER_LOOKUP ); } break; } } }