├── .github ├── dependabot.yml └── workflows │ ├── build.yml │ └── codeql-analysis.yml ├── .gitignore ├── .mvn └── wrapper │ └── maven-wrapper.properties ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── RELEASE.md ├── SECURITY.md ├── leftovers ├── Sisu.java ├── SisuGuice.java ├── peaberry.core │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── eclipse │ │ └── sisu │ │ └── peaberry │ │ ├── AttributeFilter.java │ │ ├── BundleScoped.java │ │ ├── Export.java │ │ ├── Import.java │ │ ├── Peaberry.java │ │ ├── ServiceException.java │ │ ├── ServiceRegistry.java │ │ ├── ServiceUnavailableException.java │ │ ├── ServiceWatcher.java │ │ ├── builders │ │ ├── DecoratedServiceBuilder.java │ │ ├── DirectProvider.java │ │ ├── ExportProvider.java │ │ ├── ImportDecorator.java │ │ ├── InjectedServiceBuilder.java │ │ ├── OutjectedServiceBuilder.java │ │ ├── ProxyProvider.java │ │ ├── QualifiedServiceBuilder.java │ │ ├── ServiceBuilder.java │ │ └── package-info.java │ │ ├── cache │ │ ├── AbstractServiceImport.java │ │ ├── AbstractServiceListener.java │ │ ├── AbstractServiceRegistry.java │ │ ├── CachingServiceRegistry.java │ │ ├── Chain.java │ │ ├── FilteredIterableService.java │ │ ├── FilteredServiceWatcher.java │ │ ├── ImmutableAttribute.java │ │ ├── IteratorChain.java │ │ ├── RegistryChain.java │ │ └── package-info.java │ │ ├── internal │ │ ├── ComputedMapFactory.java │ │ ├── ConcurrentImport.java │ │ ├── ConcurrentServiceWatcher.java │ │ ├── DecoratedServiceWatcher.java │ │ ├── DirectServiceFactory.java │ │ ├── ExportedServiceProvider.java │ │ ├── ImportGlue.java │ │ ├── ImportProxyClassLoader.java │ │ ├── MultipleServiceProvider.java │ │ ├── ServiceBuilderImpl.java │ │ ├── ServiceProxyFactory.java │ │ ├── ServiceSettings.java │ │ ├── Setting.java │ │ ├── SingleServiceProvider.java │ │ └── package-info.java │ │ ├── osgi │ │ ├── AttributeDictionary.java │ │ ├── BundleScopeImpl.java │ │ ├── OSGiModule.java │ │ ├── OSGiServiceAttributes.java │ │ ├── OSGiServiceExport.java │ │ ├── OSGiServiceImport.java │ │ ├── OSGiServiceListener.java │ │ ├── OSGiServiceRegistry.java │ │ └── package-info.java │ │ ├── package-info.java │ │ └── util │ │ ├── AbstractDecorator.java │ │ ├── AbstractWatcher.java │ │ ├── Attributes.java │ │ ├── Decorators.java │ │ ├── DelegatingImport.java │ │ ├── Filters.java │ │ ├── SimpleExport.java │ │ ├── StaticImport.java │ │ ├── TypeLiterals.java │ │ ├── decorators │ │ ├── DecoratorChain.java │ │ ├── InterceptingDecorator.java │ │ ├── StickyDecorator.java │ │ └── package-info.java │ │ ├── ldap │ │ ├── LdapAttributeFilter.java │ │ └── package-info.java │ │ └── package-info.java └── peaberry.eclipse │ └── src │ └── main │ ├── java │ └── org │ │ └── eclipse │ │ └── sisu │ │ └── peaberry │ │ └── eclipse │ │ ├── AggregatedExtension.java │ │ ├── EclipseRegistry.java │ │ ├── ExtensionBean.java │ │ ├── ExtensionBeanFactory.java │ │ ├── ExtensionBeanHandler.java │ │ ├── ExtensionImport.java │ │ ├── ExtensionListener.java │ │ ├── GuiceExtensionFactory.java │ │ ├── IterableExtension.java │ │ ├── MapContent.java │ │ ├── MapName.java │ │ ├── internal │ │ └── Activator.java │ │ └── package-info.java │ └── resources │ ├── plugin.xml │ └── schema │ └── modules.exsd ├── license-header-epl2.txt ├── mvnw ├── mvnw.cmd ├── org.eclipse.sisu.inject.extender ├── bnd.bnd ├── overview.html ├── pom.xml └── src │ └── main │ └── java │ └── .gitignore ├── org.eclipse.sisu.inject ├── bnd.bnd ├── overview.html ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ ├── eclipse │ │ └── sisu │ │ │ ├── BeanEntry.java │ │ │ ├── Description.java │ │ │ ├── Dynamic.java │ │ │ ├── EagerSingleton.java │ │ │ ├── Hidden.java │ │ │ ├── Mediator.java │ │ │ ├── Nullable.java │ │ │ ├── Parameters.java │ │ │ ├── PostConstruct.java │ │ │ ├── PreDestroy.java │ │ │ ├── Priority.java │ │ │ ├── Typed.java │ │ │ ├── bean │ │ │ ├── BeanBinder.java │ │ │ ├── BeanInjector.java │ │ │ ├── BeanLifecycle.java │ │ │ ├── BeanListener.java │ │ │ ├── BeanManager.java │ │ │ ├── BeanProperties.java │ │ │ ├── BeanProperty.java │ │ │ ├── BeanPropertyField.java │ │ │ ├── BeanPropertyIterator.java │ │ │ ├── BeanPropertySetter.java │ │ │ ├── BeanScheduler.java │ │ │ ├── DeclaredMembers.java │ │ │ ├── IgnoreSetters.java │ │ │ ├── LifecycleBuilder.java │ │ │ ├── LifecycleManager.java │ │ │ ├── LifecycleModule.java │ │ │ ├── PropertyBinder.java │ │ │ ├── PropertyBinding.java │ │ │ └── package-info.java │ │ │ ├── inject │ │ │ ├── AnnotatedSource.java │ │ │ ├── BeanCache.java │ │ │ ├── BeanLocator.java │ │ │ ├── BindingPublisher.java │ │ │ ├── BindingSubscriber.java │ │ │ ├── DefaultBeanLocator.java │ │ │ ├── DefaultRankingFunction.java │ │ │ ├── DeferredClass.java │ │ │ ├── DeferredProvider.java │ │ │ ├── DescriptionSource.java │ │ │ ├── Guice4.java │ │ │ ├── HiddenSource.java │ │ │ ├── Implementations.java │ │ │ ├── ImplicitBindings.java │ │ │ ├── InjectorBindings.java │ │ │ ├── LazyBeanEntry.java │ │ │ ├── Legacy.java │ │ │ ├── LocatedBeans.java │ │ │ ├── Logs.java │ │ │ ├── MildConcurrentKeys.java │ │ │ ├── MildConcurrentValues.java │ │ │ ├── MildElements.java │ │ │ ├── MildKeys.java │ │ │ ├── MildValues.java │ │ │ ├── MutableBeanLocator.java │ │ │ ├── PrioritySource.java │ │ │ ├── QualifyingStrategy.java │ │ │ ├── RankedBindings.java │ │ │ ├── RankedSequence.java │ │ │ ├── RankingFunction.java │ │ │ ├── Soft.java │ │ │ ├── Sources.java │ │ │ ├── TypeArguments.java │ │ │ ├── WatchedBeans.java │ │ │ ├── Weak.java │ │ │ └── package-info.java │ │ │ ├── launch │ │ │ ├── BundleModule.java │ │ │ ├── BundlePlan.java │ │ │ ├── InjectedTest.java │ │ │ ├── InjectedTestCase.java │ │ │ ├── Main.java │ │ │ ├── SisuBundlePlan.java │ │ │ ├── SisuExtender.java │ │ │ ├── SisuExtensions.java │ │ │ ├── SisuTracker.java │ │ │ └── package-info.java │ │ │ ├── osgi │ │ │ ├── BindingTracker.java │ │ │ ├── ServiceBinding.java │ │ │ └── ServiceBindings.java │ │ │ ├── package-info.java │ │ │ ├── space │ │ │ ├── AbstractDeferredClass.java │ │ │ ├── AbstractSisuIndex.java │ │ │ ├── AnnotationVisitor.java │ │ │ ├── BeanScanning.java │ │ │ ├── BundleClassSpace.java │ │ │ ├── ClassFinder.java │ │ │ ├── ClassSpace.java │ │ │ ├── ClassVisitor.java │ │ │ ├── CloningClassSpace.java │ │ │ ├── DefaultClassFinder.java │ │ │ ├── FileEntryIterator.java │ │ │ ├── GlobberStrategy.java │ │ │ ├── IndexedClassFinder.java │ │ │ ├── LoadedClass.java │ │ │ ├── MediationListener.java │ │ │ ├── NamedClass.java │ │ │ ├── QualifiedTypeBinder.java │ │ │ ├── QualifiedTypeListener.java │ │ │ ├── QualifiedTypeVisitor.java │ │ │ ├── QualifierCache.java │ │ │ ├── ResourceEnumeration.java │ │ │ ├── SisuIndex.java │ │ │ ├── SisuIndexAPT6.java │ │ │ ├── SpaceModule.java │ │ │ ├── SpaceScanner.java │ │ │ ├── SpaceVisitor.java │ │ │ ├── Streams.java │ │ │ ├── Tokens.java │ │ │ ├── URLClassSpace.java │ │ │ ├── WildcardKey.java │ │ │ ├── ZipEntryIterator.java │ │ │ └── package-info.java │ │ │ └── wire │ │ │ ├── AbstractTypeConverter.java │ │ │ ├── BeanProviders.java │ │ │ ├── ChildWireModule.java │ │ │ ├── DependencyAnalyzer.java │ │ │ ├── DependencyVerifier.java │ │ │ ├── DynamicGlue.java │ │ │ ├── ElementAnalyzer.java │ │ │ ├── ElementMerger.java │ │ │ ├── EntryListAdapter.java │ │ │ ├── EntryMapAdapter.java │ │ │ ├── EntrySetAdapter.java │ │ │ ├── FileTypeConverter.java │ │ │ ├── GlueLoader.java │ │ │ ├── LocatorWiring.java │ │ │ ├── MergedModule.java │ │ │ ├── MergedProperties.java │ │ │ ├── NamedIterableAdapter.java │ │ │ ├── ParameterKeys.java │ │ │ ├── PathTypeConverter.java │ │ │ ├── PlaceholderBeanProvider.java │ │ │ ├── ProviderIterableAdapter.java │ │ │ ├── StringProperties.java │ │ │ ├── TypeConverterCache.java │ │ │ ├── URLTypeConverter.java │ │ │ ├── WireModule.java │ │ │ ├── Wiring.java │ │ │ └── package-info.java │ │ └── sonatype │ │ └── inject │ │ ├── BeanEntry.java │ │ ├── BeanScanning.java │ │ ├── Description.java │ │ ├── EagerSingleton.java │ │ ├── Mediator.java │ │ ├── Nullable.java │ │ ├── Parameters.java │ │ └── package-info.java │ ├── site │ ├── markdown │ │ ├── index.md.vm │ │ ├── lifecycle.md │ │ └── named-index.md │ ├── resources │ │ └── 5min-demo.png │ └── site.xml │ └── test │ ├── java │ └── org │ │ └── eclipse │ │ └── sisu │ │ ├── BaseTests.java │ │ ├── bean │ │ ├── BeanPropertiesTest.java │ │ ├── DeclaredMembersTest.java │ │ ├── LifecycleTest.java │ │ ├── PropertyListenerTest.java │ │ ├── alpha │ │ │ ├── Base.java │ │ │ ├── HiddenPackage.java │ │ │ ├── HiddenPrivate.java │ │ │ ├── HiddenProtected.java │ │ │ ├── HiddenPublic.java │ │ │ ├── OverriddenPackage.java │ │ │ ├── OverriddenPrivate.java │ │ │ ├── OverriddenProtected.java │ │ │ ├── OverriddenPublic.java │ │ │ ├── Package.java │ │ │ ├── Private.java │ │ │ ├── Protected.java │ │ │ └── Public.java │ │ └── beta │ │ │ ├── HiddenPackage.java │ │ │ ├── HiddenPrivate.java │ │ │ ├── HiddenProtected.java │ │ │ ├── HiddenPublic.java │ │ │ ├── OverriddenPackage.java │ │ │ ├── OverriddenPrivate.java │ │ │ ├── OverriddenProtected.java │ │ │ └── OverriddenPublic.java │ │ ├── inject │ │ ├── DefaultBeanLocatorTest.java │ │ ├── ImplementationsTest.java │ │ ├── LazyBeanEntryTest.java │ │ ├── LocatedBeansTest.java │ │ ├── LoggingExample.java │ │ ├── LogsTest.java │ │ ├── MildElementsTest.java │ │ ├── MildKeysTest.java │ │ ├── MildValuesTest.java │ │ ├── PriorityTest.java │ │ ├── RankedBindingsTest.java │ │ ├── RankedSequenceTest.java │ │ ├── TypeArgumentsTest.java │ │ └── WatchedBeansTest.java │ │ ├── launch │ │ ├── AssistedTestCase.java │ │ ├── Custom1TestCase.java │ │ ├── Custom2Test.java │ │ ├── Custom3TestCase.java │ │ ├── ExampleTestCase.java │ │ ├── ExampleTypes.java │ │ ├── PrivateModuleTestCase.java │ │ └── RequireBindingsTestCase.java │ │ ├── space │ │ ├── BeanWatcherTest.java │ │ ├── BrokenScanningExample.java │ │ ├── BundleClassSpaceTest.java │ │ ├── CachingModuleTest.java │ │ ├── DeferredClassTest.java │ │ ├── DeferredProviderTest.java │ │ ├── FileEntryIteratorTest.java │ │ ├── QualifiedModuleTest.java │ │ ├── QualifiedProviderTest.java │ │ ├── QualifiedScanningTest.java │ │ ├── QualifiedTypesTest.java │ │ ├── ResourceEnumerationTest.java │ │ ├── TokensTest.java │ │ ├── URLClassSpaceTest.java │ │ ├── ZipEntryIteratorTest.java │ │ └── oops │ │ │ └── Handler.java │ │ └── wire │ │ ├── BeanImportTest.java │ │ ├── EntryListAdapterTest.java │ │ ├── EntryMapAdapterTest.java │ │ ├── FileTypeConverterTest.java │ │ ├── NamedIterableAdapterTest.java │ │ ├── ParametersTest.java │ │ ├── PathTypeConverterTest.java │ │ └── URLTypeConverterTest.java │ └── resources │ ├── Incomplete.class │ ├── IncompleteBase.class │ └── org │ └── eclipse │ └── sisu │ ├── launch │ └── inject.properties │ └── space │ ├── META-INF │ └── sisu │ │ └── javax.inject.Named │ ├── blank.zip │ ├── broken.jar │ ├── class path.jar │ ├── commons-logging-1.1.1.jar │ ├── commons-logging-license.txt │ ├── corrupt.manifest │ └── META-INF │ │ └── MANIFEST.MF │ │ └── placeholder.txt │ ├── embedded.zip │ ├── empty.jar │ ├── empty.zip │ ├── icu4j-2.6.1.jar │ ├── icu4j-license.txt │ ├── logging_bundle.jar │ ├── nested.war │ ├── simple.jar │ ├── simple.zip │ └── simple_bundle.jar ├── org.eclipse.sisu.mojos ├── pom.xml └── src │ ├── it │ ├── settings.xml │ └── simple │ │ ├── pom.xml │ │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── simple │ │ │ └── Test.java │ │ └── verify.groovy │ ├── main │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── sisu │ │ │ └── mojos │ │ │ ├── IndexMojo.java │ │ │ ├── MainIndexMojo.java │ │ │ └── TestIndexMojo.java │ └── resources │ │ ├── META-INF │ │ └── m2e │ │ │ └── lifecycle-mapping-metadata.xml │ │ └── about.html │ └── site │ ├── markdown │ └── index.md │ └── site.xml ├── org.eclipse.sisu.plexus.extender ├── META-INF │ └── services │ │ └── org.eclipse.sisu.launch.BundlePlan ├── bnd.bnd ├── overview.html ├── pom.xml └── src │ └── main │ └── java │ └── .gitignore ├── org.eclipse.sisu.plexus ├── bnd.bnd ├── overview.html ├── pom.xml └── src │ ├── main │ └── java │ │ └── org │ │ ├── codehaus │ │ └── plexus │ │ │ ├── ContainerConfiguration.java │ │ │ ├── DefaultContainerConfiguration.java │ │ │ ├── DefaultPlexusContainer.java │ │ │ ├── MutablePlexusContainer.java │ │ │ ├── PlexusConstants.java │ │ │ ├── PlexusContainer.java │ │ │ ├── PlexusContainerException.java │ │ │ ├── PlexusTestCase.java │ │ │ ├── component │ │ │ ├── MapOrientedComponent.java │ │ │ ├── composition │ │ │ │ └── CycleDetectedInComponentGraphException.java │ │ │ ├── configurator │ │ │ │ ├── AbstractComponentConfigurator.java │ │ │ │ ├── BasicComponentConfigurator.java │ │ │ │ ├── ComponentConfigurationException.java │ │ │ │ ├── ComponentConfigurator.java │ │ │ │ ├── ConfigurationListener.java │ │ │ │ ├── MapOrientedComponentConfigurator.java │ │ │ │ ├── converters │ │ │ │ │ ├── AbstractConfigurationConverter.java │ │ │ │ │ ├── ConfigurationConverter.java │ │ │ │ │ ├── ParameterizedConfigurationConverter.java │ │ │ │ │ ├── basic │ │ │ │ │ │ ├── AbstractBasicConverter.java │ │ │ │ │ │ ├── BooleanConverter.java │ │ │ │ │ │ ├── ByteConverter.java │ │ │ │ │ │ ├── CharConverter.java │ │ │ │ │ │ ├── ClassConverter.java │ │ │ │ │ │ ├── DateConverter.java │ │ │ │ │ │ ├── DoubleConverter.java │ │ │ │ │ │ ├── EnumConverter.java │ │ │ │ │ │ ├── FileConverter.java │ │ │ │ │ │ ├── FloatConverter.java │ │ │ │ │ │ ├── IntConverter.java │ │ │ │ │ │ ├── LongConverter.java │ │ │ │ │ │ ├── PathConverter.java │ │ │ │ │ │ ├── ShortConverter.java │ │ │ │ │ │ ├── StringBufferConverter.java │ │ │ │ │ │ ├── StringBuilderConverter.java │ │ │ │ │ │ ├── StringConverter.java │ │ │ │ │ │ ├── TemporalConverter.java │ │ │ │ │ │ ├── UriConverter.java │ │ │ │ │ │ └── UrlConverter.java │ │ │ │ │ ├── composite │ │ │ │ │ │ ├── AbstractCollectionConverter.java │ │ │ │ │ │ ├── ArrayConverter.java │ │ │ │ │ │ ├── CollectionConverter.java │ │ │ │ │ │ ├── MapConverter.java │ │ │ │ │ │ ├── ObjectWithFieldsConverter.java │ │ │ │ │ │ ├── PlexusConfigurationConverter.java │ │ │ │ │ │ └── PropertiesConverter.java │ │ │ │ │ ├── lookup │ │ │ │ │ │ ├── ConverterLookup.java │ │ │ │ │ │ └── DefaultConverterLookup.java │ │ │ │ │ └── special │ │ │ │ │ │ └── ClassRealmConverter.java │ │ │ │ └── expression │ │ │ │ │ ├── DefaultExpressionEvaluator.java │ │ │ │ │ ├── ExpressionEvaluationException.java │ │ │ │ │ ├── ExpressionEvaluator.java │ │ │ │ │ └── TypeAwareExpressionEvaluator.java │ │ │ ├── factory │ │ │ │ ├── AbstractComponentFactory.java │ │ │ │ ├── ComponentFactory.java │ │ │ │ └── ComponentInstantiationException.java │ │ │ └── repository │ │ │ │ ├── ComponentDependency.java │ │ │ │ ├── ComponentDescriptor.java │ │ │ │ ├── ComponentRequirement.java │ │ │ │ ├── ComponentRequirementList.java │ │ │ │ ├── ComponentSetDescriptor.java │ │ │ │ └── exception │ │ │ │ ├── ComponentLifecycleException.java │ │ │ │ ├── ComponentLookupException.java │ │ │ │ └── ComponentRepositoryException.java │ │ │ ├── configuration │ │ │ ├── DefaultPlexusConfiguration.java │ │ │ ├── PlexusConfiguration.java │ │ │ ├── PlexusConfigurationException.java │ │ │ └── xml │ │ │ │ └── XmlPlexusConfiguration.java │ │ │ ├── context │ │ │ ├── Context.java │ │ │ ├── ContextException.java │ │ │ ├── ContextMapAdapter.java │ │ │ └── DefaultContext.java │ │ │ ├── logging │ │ │ ├── AbstractLogEnabled.java │ │ │ ├── AbstractLogger.java │ │ │ ├── AbstractLoggerManager.java │ │ │ ├── BaseLoggerManager.java │ │ │ ├── LogEnabled.java │ │ │ ├── Logger.java │ │ │ ├── LoggerManager.java │ │ │ └── console │ │ │ │ ├── ConsoleLogger.java │ │ │ │ └── ConsoleLoggerManager.java │ │ │ └── personality │ │ │ └── plexus │ │ │ └── lifecycle │ │ │ └── phase │ │ │ ├── Configurable.java │ │ │ ├── Contextualizable.java │ │ │ ├── Disposable.java │ │ │ ├── Initializable.java │ │ │ ├── InitializationException.java │ │ │ ├── PlexusContainerLocator.java │ │ │ ├── ServiceLocator.java │ │ │ ├── Serviceable.java │ │ │ ├── Startable.java │ │ │ ├── StartingException.java │ │ │ ├── StoppingException.java │ │ │ └── Suspendable.java │ │ └── eclipse │ │ └── sisu │ │ └── plexus │ │ ├── ComponentDescriptorBeanModule.java │ │ ├── ComponentImpl.java │ │ ├── CompositeBeanHelper.java │ │ ├── ConfigurationImpl.java │ │ ├── DefaultPlexusBeanLocator.java │ │ ├── DefaultPlexusBeans.java │ │ ├── HintedPlexusBeans.java │ │ ├── Hints.java │ │ ├── LazyPlexusBean.java │ │ ├── MissingPlexusBean.java │ │ ├── OptionalPropertyBinding.java │ │ ├── PlexusAnnotatedBeanModule.java │ │ ├── PlexusAnnotatedMetadata.java │ │ ├── PlexusBean.java │ │ ├── PlexusBeanBinder.java │ │ ├── PlexusBeanConverter.java │ │ ├── PlexusBeanLocator.java │ │ ├── PlexusBeanMetadata.java │ │ ├── PlexusBeanModule.java │ │ ├── PlexusBeanSource.java │ │ ├── PlexusBindingModule.java │ │ ├── PlexusBundlePlan.java │ │ ├── PlexusConfigurations.java │ │ ├── PlexusDateTypeConverter.java │ │ ├── PlexusLifecycleManager.java │ │ ├── PlexusPropertyBinder.java │ │ ├── PlexusRequirements.java │ │ ├── PlexusSpaceModule.java │ │ ├── PlexusTypeBinder.java │ │ ├── PlexusTypeListener.java │ │ ├── PlexusTypeRegistry.java │ │ ├── PlexusTypeVisitor.java │ │ ├── PlexusXmlBeanConverter.java │ │ ├── PlexusXmlBeanModule.java │ │ ├── PlexusXmlMetadata.java │ │ ├── PlexusXmlScanner.java │ │ ├── ProvidedPropertyBinding.java │ │ ├── PseudoPlexusContainer.java │ │ ├── RealmFilteredBeans.java │ │ ├── RealmManager.java │ │ ├── RequirementImpl.java │ │ ├── Roles.java │ │ ├── Strategies.java │ │ ├── TypeArguments.java │ │ └── package-info.java │ ├── site │ ├── markdown │ │ ├── configuration.md │ │ ├── conversion-to-jsr330.md │ │ └── index.md │ └── site.xml │ └── test │ ├── java │ └── org │ │ ├── codehaus │ │ └── plexus │ │ │ └── component │ │ │ └── configurator │ │ │ └── converters │ │ │ ├── basic │ │ │ └── EnumConverterTest.java │ │ │ └── composite │ │ │ ├── MapConverterTest.java │ │ │ └── PropertiesConverterTest.java │ │ └── eclipse │ │ └── sisu │ │ ├── BaseTests.java │ │ └── plexus │ │ ├── ArrayConstantTest.java │ │ ├── BadBean.java │ │ ├── BasicComponentConfiguratorTest.java │ │ ├── BeanConstantTest.java │ │ ├── ClassRealmConverterTest.java │ │ ├── CollectionConstantTest.java │ │ ├── ComponentAnnotationTest.java │ │ ├── ConfigurationAnnotationTest.java │ │ ├── ConfigurationConverter.java │ │ ├── DateConstantTest.java │ │ ├── DefaultValuesTest.java │ │ ├── HintsTest.java │ │ ├── MapConstantTest.java │ │ ├── MissingClass.java │ │ ├── ParameterizedCollectionTest.java │ │ ├── PlexusAnnotatedBeanMetadataTest.java │ │ ├── PlexusBeanLocatorTest.java │ │ ├── PlexusBeanMetadataTest.java │ │ ├── PlexusConfigurationTest.java │ │ ├── PlexusLifecycleTest.java │ │ ├── PlexusLoggingTest.java │ │ ├── PlexusRequirementTest.java │ │ ├── PlexusStrictClasspathScanningTest.java │ │ ├── PlexusXmlScannerTest.java │ │ ├── RealmDisposalTest.java │ │ ├── RequirementAnnotationTest.java │ │ ├── RolesTest.java │ │ ├── SimpleRequirementExample.java │ │ ├── SimpleScanningExample.java │ │ ├── TestBean.java │ │ └── component │ │ ├── Jsr330Component1.java │ │ └── Jsr330Component2.java │ └── resources │ ├── META-INF │ └── plexus │ │ ├── bad_components_1.xml │ │ ├── bad_components_2.xml │ │ ├── bad_components_3.xml │ │ ├── bad_components_4.xml │ │ ├── bad_plexus_1.xml │ │ ├── components.xml │ │ ├── plexus.xml │ │ └── variable_components.xml │ ├── component-jar │ ├── component-jar-0.1.jar │ ├── pom.xml │ └── src │ │ └── main │ │ ├── java │ │ └── org │ │ │ └── eclipse │ │ │ └── sisu │ │ │ └── plexus │ │ │ └── tests │ │ │ └── SomeComponent.java │ │ └── resources │ │ └── META-INF │ │ └── plexus │ │ └── components.xml │ ├── invalid-plexus-components │ └── META-INF │ │ └── plexus │ │ └── components.xml │ └── invalid-sisu-components │ └── META-INF │ └── sisu │ └── javax.inject.Named ├── pom.xml ├── sisu-eclipse-codestyle.xml └── src └── site ├── markdown ├── development.md ├── download.md.vm ├── index.md └── support.md ├── resources ├── eclipse-foundation.svg └── sisu-black.png └── site.xml /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | 4 | - package-ecosystem: "maven" 5 | directory: "/" 6 | schedule: 7 | interval: "daily" 8 | 9 | - package-ecosystem: "github-actions" 10 | directory: "/" 11 | schedule: 12 | interval: "daily" 13 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | 2 | name: "CodeQL" 3 | 4 | on: 5 | push: 6 | branches: [ main ] 7 | pull_request: 8 | branches: [ main ] 9 | workflow_dispatch: 10 | 11 | jobs: 12 | analyze: 13 | name: Analyze 14 | runs-on: ubuntu-latest 15 | permissions: 16 | actions: read 17 | contents: read 18 | security-events: write 19 | 20 | strategy: 21 | fail-fast: false 22 | 23 | steps: 24 | - name: Checkout repository 25 | uses: actions/checkout@v4 26 | 27 | - name: Initialize CodeQL 28 | uses: github/codeql-action/init@v3 29 | with: 30 | languages: 'java' 31 | 32 | - name: Autobuild 33 | uses: github/codeql-action/autobuild@v3 34 | 35 | - name: Perform CodeQL Analysis 36 | uses: github/codeql-action/analyze@v3 37 | 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .project 3 | .classpath 4 | .settings 5 | .idea/ 6 | *.iml 7 | *.ipr 8 | *.iws 9 | *.diff 10 | *.patch 11 | *.log 12 | *.swp 13 | dependency-reduced-pom.xml 14 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | wrapperVersion=3.3.2 18 | distributionType=only-script 19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip 20 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | Do not open a public issue to report a security vulnerability. Please send a message to security@eclipse.org and we will create a private issue in which the issue can be triaged and handled. 6 | 7 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/AttributeFilter.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry; 13 | 14 | import java.util.Map; 15 | 16 | /** 17 | * Simple matching filter for service attributes. 18 | * 19 | * @author mcculls@gmail.com (Stuart McCulloch) 20 | */ 21 | public interface AttributeFilter { 22 | 23 | /** 24 | * Tests whether or not this filter matches the given service attributes. 25 | * 26 | * @param attributes service attributes 27 | * @return true if the given attributes match this filter, otherwise false 28 | */ 29 | boolean matches(Map attributes); 30 | } 31 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/BundleScoped.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry; 13 | 14 | import static java.lang.annotation.ElementType.METHOD; 15 | import static java.lang.annotation.ElementType.TYPE; 16 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 17 | 18 | import java.lang.annotation.Retention; 19 | import java.lang.annotation.Target; 20 | 21 | import org.osgi.framework.BundleContext; 22 | 23 | import com.google.inject.ScopeAnnotation; 24 | 25 | /** 26 | * Apply this to implementation classes when you want only one instance (per 27 | * {@link BundleContext}) to be reused for all injections for that binding. 28 | * 29 | * @author mcculls@gmail.com (Stuart McCulloch) 30 | * 31 | * @since 1.1 32 | */ 33 | @Target({TYPE, METHOD}) 34 | @Retention(RUNTIME) 35 | @ScopeAnnotation 36 | public @interface BundleScoped {} 37 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/Export.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry; 13 | 14 | import java.util.Map; 15 | 16 | /** 17 | * Handle to a service instance exported to a {@link ServiceWatcher}. 18 | * 19 | * @author mcculls@gmail.com (Stuart McCulloch) 20 | */ 21 | public interface Export 22 | extends Import { 23 | 24 | /** 25 | * Replace the exported service with the given instance. 26 | * 27 | * @param instance service instance 28 | */ 29 | void put(T instance); 30 | 31 | /** 32 | * Update the attributes associated with the exported service. 33 | * 34 | * @param attributes service attributes 35 | */ 36 | void attributes(Map attributes); 37 | 38 | /** 39 | * Remove the exported service from the {@link ServiceWatcher}. 40 | */ 41 | void unput(); 42 | } 43 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/ServiceWatcher.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry; 13 | 14 | /** 15 | * A service watcher can receive services provided by other registries. 16 | * 17 | * @author mcculls@gmail.com (Stuart McCulloch) 18 | * 19 | * @since 1.1 20 | */ 21 | public interface ServiceWatcher { 22 | 23 | /** 24 | * Add the given service to this watcher. 25 | * 26 | * @param service imported service handle 27 | * @return exported service handle, null if the watcher is not interested 28 | */ 29 | Export add(Import service); 30 | } 31 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/DecoratedServiceBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.builders; 13 | 14 | import org.eclipse.sisu.peaberry.Peaberry; 15 | 16 | import com.google.inject.Key; 17 | 18 | /** 19 | * See {@link Peaberry} for examples of the dynamic service builder API. 20 | * 21 | * @author mcculls@gmail.com (Stuart McCulloch) 22 | */ 23 | public interface DecoratedServiceBuilder 24 | extends QualifiedServiceBuilder { 25 | 26 | /** 27 | * Apply the given decoration to the dynamic service. 28 | * 29 | * @param key decorator key 30 | * @return dynamic service builder 31 | */ 32 | QualifiedServiceBuilder decoratedWith(Key> key); 33 | 34 | /** 35 | * Apply the given decoration to the dynamic service. 36 | * 37 | * @param instance decorator 38 | * @return dynamic service builder 39 | */ 40 | QualifiedServiceBuilder decoratedWith(ImportDecorator instance); 41 | } 42 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/DirectProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.builders; 13 | 14 | import org.eclipse.sisu.peaberry.Peaberry; 15 | 16 | import com.google.inject.Provider; 17 | 18 | /** 19 | * See {@link Peaberry} for examples of the dynamic service builder API. 20 | * 21 | * @author mcculls@gmail.com (Stuart McCulloch) 22 | */ 23 | public interface DirectProvider { 24 | 25 | /** 26 | * @return direct (non-proxied) service provider 27 | */ 28 | Provider direct(); 29 | } 30 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/ExportProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.builders; 13 | 14 | import org.eclipse.sisu.peaberry.Export; 15 | import org.eclipse.sisu.peaberry.Peaberry; 16 | 17 | import com.google.inject.Provider; 18 | 19 | /** 20 | * See {@link Peaberry} for examples of the dynamic service builder API. 21 | * 22 | * @author mcculls@gmail.com (Stuart McCulloch) 23 | */ 24 | public interface ExportProvider 25 | extends Provider>, DirectProvider {} 26 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/ImportDecorator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.builders; 13 | 14 | import org.eclipse.sisu.peaberry.Import; 15 | 16 | /** 17 | * Provide runtime decoration/intercepting of imported services. 18 | * 19 | * @author mcculls@gmail.com (Stuart McCulloch) 20 | */ 21 | public interface ImportDecorator { 22 | 23 | /** 24 | * Decorate the given imported service. 25 | * 26 | * @param service imported service handle 27 | * @return decorated service handle 28 | */ 29 | Import decorate(Import service); 30 | } 31 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/OutjectedServiceBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.builders; 13 | 14 | import org.eclipse.sisu.peaberry.Peaberry; 15 | import org.eclipse.sisu.peaberry.ServiceWatcher; 16 | 17 | import com.google.inject.Key; 18 | 19 | /** 20 | * See {@link Peaberry} for examples of the dynamic service builder API. 21 | * 22 | * @author mcculls@gmail.com (Stuart McCulloch) 23 | */ 24 | public interface OutjectedServiceBuilder 25 | extends ServiceBuilder { 26 | 27 | /** 28 | * Outject the dynamic service to the given watcher. 29 | * 30 | * @param key service watcher key 31 | * @return dynamic service builder 32 | */ 33 | ServiceBuilder out(Key> key); 34 | 35 | /** 36 | * Outject the dynamic service to the given watcher. 37 | * 38 | * @param instance service watcher 39 | * @return dynamic service builder 40 | */ 41 | ServiceBuilder out(ServiceWatcher instance); 42 | } 43 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/ProxyProvider.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.builders; 13 | 14 | import org.eclipse.sisu.peaberry.Peaberry; 15 | 16 | import com.google.inject.Provider; 17 | 18 | /** 19 | * See {@link Peaberry} for examples of the dynamic service builder API. 20 | * 21 | * @author mcculls@gmail.com (Stuart McCulloch) 22 | */ 23 | public interface ProxyProvider 24 | extends Provider, DirectProvider {} 25 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/ServiceBuilder.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.builders; 13 | 14 | import org.eclipse.sisu.peaberry.Peaberry; 15 | 16 | /** 17 | * See {@link Peaberry} for examples of the dynamic service builder API. 18 | * 19 | * @author mcculls@gmail.com (Stuart McCulloch) 20 | */ 21 | public interface ServiceBuilder { 22 | 23 | /** 24 | * @return single service provider 25 | */ 26 | ProxyProvider single(); 27 | 28 | /** 29 | * @return multiple service provider 30 | */ 31 | ProxyProvider> multiple(); 32 | 33 | /** 34 | * @return exported service provider 35 | */ 36 | ExportProvider export(); 37 | } 38 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/builders/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * Fluent APIs for importing and exporting dynamic services. 14 | * 15 | *

The principal members of this package are: 16 | * 17 | *

18 | * 19 | *
{@link org.eclipse.sisu.peaberry.builders.DecoratedServiceBuilder} 20 | *
The interface that describes how to build dynamic service providers. 21 | * 22 | *
{@link org.eclipse.sisu.peaberry.builders.ImportDecorator} 23 | *
The interface you can implement in order to decorate dynamic services. 24 | * 25 | *
26 | */ 27 | package org.eclipse.sisu.peaberry.builders; 28 | 29 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/cache/CachingServiceRegistry.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.cache; 13 | 14 | import org.eclipse.sisu.peaberry.ServiceRegistry; 15 | 16 | /** 17 | * {@link ServiceRegistry} that caches service instances for faster lookup. 18 | * 19 | * @author mcculls@gmail.com (Stuart McCulloch) 20 | */ 21 | public interface CachingServiceRegistry 22 | extends ServiceRegistry { 23 | 24 | /** 25 | * Release any unused service instances from the cache. 26 | * 27 | * @param targetGeneration the generation to flush 28 | */ 29 | void flush(int targetGeneration); 30 | } 31 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/cache/Chain.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.cache; 13 | 14 | import static java.lang.annotation.ElementType.PARAMETER; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.Target; 19 | 20 | import com.google.inject.BindingAnnotation; 21 | 22 | @Target(PARAMETER) 23 | @Retention(RUNTIME) 24 | @BindingAnnotation 25 | public @interface Chain {} 26 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/cache/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * {@link org.eclipse.sisu.peaberry.ServiceRegistry} caching support. 14 | */ 15 | package org.eclipse.sisu.peaberry.cache; 16 | 17 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/internal/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * Implementation of peaberry. 14 | */ 15 | package org.eclipse.sisu.peaberry.internal; 16 | 17 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/osgi/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * OSGi {@link org.eclipse.sisu.peaberry.ServiceRegistry} implementation. 14 | */ 15 | package org.eclipse.sisu.peaberry.osgi; 16 | 17 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * peaberry - Dynamic services for Google-Guice. 15 | * 16 | *

The principal members of this package are: 17 | * 18 | *

19 | * 20 | *
{@link org.eclipse.sisu.peaberry.Peaberry} 21 | *
The builder that can assemble providers to import or export dynamic services. 22 | * 23 | *
{@link org.eclipse.sisu.peaberry.ServiceUnavailableException} 24 | *
The exception thrown when you attempt to use a service that is not available. 25 | * 26 | *
{@link org.eclipse.sisu.peaberry.ServiceRegistry} 27 | *
The interface you can implement in order to plug-in other service frameworks. 28 | * 29 | *
{@link org.eclipse.sisu.peaberry.ServiceWatcher} 30 | *
The interface you can implement in order to watch services coming and going. 31 | * 32 | *
33 | */ 34 | package org.eclipse.sisu.peaberry; 35 | 36 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/util/decorators/DecoratorChain.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.util.decorators; 13 | 14 | import org.eclipse.sisu.peaberry.Import; 15 | import org.eclipse.sisu.peaberry.builders.ImportDecorator; 16 | 17 | /** 18 | * An {@link ImportDecorator} that applies decorators in a chain, right-left. 19 | * 20 | * @author mcculls@gmail.com (Stuart McCulloch) 21 | */ 22 | public final class DecoratorChain 23 | implements ImportDecorator { 24 | 25 | private final ImportDecorator[] decorators; 26 | 27 | public DecoratorChain(final ImportDecorator... decorators) { 28 | this.decorators = decorators.clone(); 29 | } 30 | 31 | public Import decorate(final Import service) { 32 | Import decoratedService = service; 33 | for (int i = decorators.length - 1; 0 <= i; i--) { 34 | decoratedService = decorators[i].decorate(decoratedService); 35 | } 36 | return decoratedService; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/util/decorators/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * General purpose {@link org.eclipse.sisu.peaberry.builders.ImportDecorator}s. 14 | */ 15 | package org.eclipse.sisu.peaberry.util.decorators; 16 | 17 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/util/ldap/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * Implementation of LDAP helpers. 14 | */ 15 | package org.eclipse.sisu.peaberry.util.ldap; 16 | 17 | -------------------------------------------------------------------------------- /leftovers/peaberry.core/src/main/java/org/eclipse/sisu/peaberry/util/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * Optional helper methods. 14 | */ 15 | package org.eclipse.sisu.peaberry.util; 16 | 17 | -------------------------------------------------------------------------------- /leftovers/peaberry.eclipse/src/main/java/org/eclipse/sisu/peaberry/eclipse/ExtensionBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.eclipse; 13 | 14 | import static java.lang.annotation.ElementType.TYPE; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.Target; 19 | 20 | /** 21 | * Use this to map a bean type to a particular Extension Point. 22 | * 23 | * @author mcculls@gmail.com (Stuart McCulloch) 24 | */ 25 | @Target(TYPE) 26 | @Retention(RUNTIME) 27 | public @interface ExtensionBean { 28 | 29 | /** 30 | * if true then the Extension elements will be combined into one bean 31 | */ 32 | boolean aggregate() default false; 33 | 34 | /** 35 | * the unique identifier of the Extension Point 36 | */ 37 | String value(); 38 | } 39 | -------------------------------------------------------------------------------- /leftovers/peaberry.eclipse/src/main/java/org/eclipse/sisu/peaberry/eclipse/MapContent.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.eclipse; 13 | 14 | import static java.lang.annotation.ElementType.METHOD; 15 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 16 | 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.Target; 19 | 20 | /** 21 | * Use this to map a bean method to the text content of an XML element. 22 | * 23 | * @author mcculls@gmail.com (Stuart McCulloch) 24 | */ 25 | @Target(METHOD) 26 | @Retention(RUNTIME) 27 | public @interface MapContent {} 28 | -------------------------------------------------------------------------------- /leftovers/peaberry.eclipse/src/main/java/org/eclipse/sisu/peaberry/eclipse/MapName.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.eclipse; 13 | 14 | import static java.lang.annotation.ElementType.METHOD; 15 | import static java.lang.annotation.ElementType.TYPE; 16 | import static java.lang.annotation.RetentionPolicy.RUNTIME; 17 | 18 | import java.lang.annotation.Retention; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Use this to map a bean method (or type) to a particular XML attribute. 23 | * 24 | * @author mcculls@gmail.com (Stuart McCulloch) 25 | */ 26 | @Target({METHOD, TYPE}) 27 | @Retention(RUNTIME) 28 | public @interface MapName { 29 | 30 | /** 31 | * the XML attribute name 32 | */ 33 | String value(); 34 | } 35 | -------------------------------------------------------------------------------- /leftovers/peaberry.eclipse/src/main/java/org/eclipse/sisu/peaberry/eclipse/internal/Activator.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | package org.eclipse.sisu.peaberry.eclipse.internal; 13 | 14 | import org.eclipse.sisu.peaberry.eclipse.EclipseRegistry; 15 | import org.osgi.framework.BundleActivator; 16 | import org.osgi.framework.BundleContext; 17 | 18 | /** 19 | * OSGi {@link BundleActivator} that cleans up and removes registry listeners. 20 | * 21 | * @author mcculls@gmail.com (Stuart McCulloch) 22 | */ 23 | public final class Activator 24 | implements BundleActivator { 25 | 26 | public void start(final BundleContext bundleContext) {/* nothing to do */} 27 | 28 | public void stop(final BundleContext bundleContext) { 29 | ((EclipseRegistry) EclipseRegistry.eclipseRegistry()).shutdown(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /leftovers/peaberry.eclipse/src/main/java/org/eclipse/sisu/peaberry/eclipse/package-info.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2008, 2014 Stuart McCulloch 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | 12 | /** 13 | * Eclipse Extension {@link org.eclipse.sisu.peaberry.ServiceRegistry} implementation. 14 | */ 15 | package org.eclipse.sisu.peaberry.eclipse; 16 | 17 | -------------------------------------------------------------------------------- /leftovers/peaberry.eclipse/src/main/resources/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /license-header-epl2.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) ${year} Sonatype, Inc. and others. 2 | All rights reserved. This program and the accompanying materials 3 | are made available under the terms of the Eclipse Public License 2.0 4 | which accompanies this distribution, and is available at 5 | https://www.eclipse.org/legal/epl-2.0/ 6 | 7 | SPDX-License-Identifier: EPL-2.0 8 | 9 | Contributors: 10 | Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 11 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject.extender/bnd.bnd: -------------------------------------------------------------------------------- 1 | Bundle-Name: Sisu-Inject Extender (Incubation) 2 | Bundle-SymbolicName: org.eclipse.sisu.inject.extender;singleton:=true 3 | Bundle-Activator: org.eclipse.sisu.launch.SisuExtender 4 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject.extender/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Overview

4 | Sisu is a modular JSR330-based container that supports classpath scanning, auto-binding, and dynamic auto-wiring. 5 |

6 | Sisu uses Google-Guice to perform dependency injection and provide the core JSR330 support, but removes the need to write explicit bindings in Guice modules. 7 |

8 | This bundle contains a BundleActivator that maintains a dynamic injector graph by scanning bundles as they come and go. 9 | 10 | 11 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject.extender/src/main/java/.gitignore: -------------------------------------------------------------------------------- 1 | # keep src folder around 2 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/bnd.bnd: -------------------------------------------------------------------------------- 1 | Bundle-Name: Sisu-Inject (Incubation) 2 | Bundle-SymbolicName: org.eclipse.sisu.inject;singleton:=true 3 | Main-Class: org.eclipse.sisu.launch.Main 4 | -exportcontents: !*.asm.*,\ 5 | org.eclipse.sisu.*,\ 6 | org.sonatype.inject;x-internal:=true 7 | # remove annotation processor dependencies (never used at runtime) 8 | # mark all optional dependencies as optional 9 | Import-Package: javax.inject,\ 10 | org.objectweb.asm.*,\ 11 | com.google.inject.servlet;resolution:=optional,\ 12 | javax.servlet.*;resolution:=optional,\ 13 | org.slf4j.*;resolution:=optional,\ 14 | org.junit.*;resolution:=optional,\ 15 | junit.framework.*;resolution:=optional,\ 16 | org.testng.*;resolution:=optional,\ 17 | !javax.annotation.processing.*,\ 18 | !javax.lang.model.*,\ 19 | !javax.tools.*,\ 20 | * 21 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/Description.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Describes a bean:
23 | *
24 | * 25 | *

26 |  * @Named
27 |  * @Description( "Summarizes system status" )
28 |  * public class SystemStatus
29 |  * {
30 |  *     //
31 |  * }
32 |  * 
33 | * 34 | * @see BeanEntry#getDescription() 35 | */ 36 | @Target( value = { ElementType.TYPE } ) 37 | @Retention( RetentionPolicy.RUNTIME ) 38 | @Documented 39 | public @interface Description 40 | { 41 | String value(); 42 | } 43 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/Dynamic.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | import javax.inject.Qualifier; 22 | 23 | /** 24 | * Marks dependencies that should be dynamic proxies:
25 | *
26 | * 27 | *
28 |  * @Inject
29 |  * @Dynamic
30 |  * Component proxy;
31 |  * 
32 | */ 33 | @Target( value = { ElementType.FIELD, ElementType.PARAMETER } ) 34 | @Retention( RetentionPolicy.RUNTIME ) 35 | @Documented 36 | @Qualifier 37 | public @interface Dynamic 38 | { 39 | } 40 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/EagerSingleton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Marks beans that should be created as soon as possible:
23 | *
24 | * 25 | *
26 |  * @Named
27 |  * @EagerSingleton
28 |  * public class Startup
29 |  * {
30 |  *     //
31 |  * }
32 |  * 
33 | */ 34 | @Target( value = { ElementType.TYPE } ) 35 | @Retention( RetentionPolicy.RUNTIME ) 36 | @Documented 37 | public @interface EagerSingleton 38 | { 39 | } 40 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/Hidden.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Hides a bean from being located or watched:
23 | *
24 | * 25 | *
26 |  * @Named
27 |  * @Hidden
28 |  * public class InternalComponent
29 |  * {
30 |  *     //
31 |  * }
32 |  * 
33 | * 34 | * @see org.eclipse.sisu.inject.BeanLocator 35 | */ 36 | @Target( value = { ElementType.TYPE } ) 37 | @Retention( RetentionPolicy.RUNTIME ) 38 | @Documented 39 | public @interface Hidden 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/Nullable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Marks dependencies that can be {@code null}:
23 | *
24 | * 25 | *
26 |  * @Inject
27 |  * @Nullable
28 |  * Component optional;
29 |  * 
30 | */ 31 | @Target( value = { ElementType.FIELD, ElementType.PARAMETER } ) 32 | @Retention( RetentionPolicy.RUNTIME ) 33 | @Documented 34 | public @interface Nullable 35 | { 36 | } 37 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/PostConstruct.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * The PostConstruct annotation is used on a method that needs to be executed 23 | * after dependency injection is done to perform any initialization. This 24 | * method is invoked by Sisu before the class is put into service. 25 | *

26 | * This annotation is Sisu specific annotation, that has same semantics as 27 | * {@link javax.annotation.PostConstruct} annotation has, and may be used 28 | * interchangeably. 29 | *

30 | * To use annotation {@link org.eclipse.sisu.bean.LifecycleModule} needs to be 31 | * installed. 32 | * 33 | * @since 0.9.0.M2 34 | */ 35 | @Target( value = { ElementType.METHOD } ) 36 | @Retention( RetentionPolicy.RUNTIME ) 37 | @Documented 38 | public @interface PostConstruct 39 | { 40 | } 41 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/PreDestroy.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * The PreDestroy annotation is used on methods as a callback notification to 23 | * signal that the instance is in the process of being removed by the 24 | * container. The method annotated with PreDestroy is typically used to 25 | * release resources that it has been holding. 26 | *

27 | * This annotation is Sisu specific annotation, that has same semantics as 28 | * {@link javax.annotation.PreDestroy} annotation has, and may be used 29 | * interchangeably. 30 | *

31 | * To use annotation {@link org.eclipse.sisu.bean.LifecycleModule} needs to be 32 | * installed. 33 | * 34 | * @since 0.9.0.M2 35 | */ 36 | 37 | @Target( value = { ElementType.METHOD } ) 38 | @Retention( RetentionPolicy.RUNTIME ) 39 | @Documented 40 | public @interface PreDestroy 41 | { 42 | } 43 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/Priority.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Defines the priority ordering of a bean, higher values have higher priority:
23 | *
24 | * 25 | *

26 |  * @Named
27 |  * @Priority( 999 )
28 |  * public class ImportantComponent
29 |  * {
30 |  *     //
31 |  * }
32 |  * 
33 | * 34 | * Implicit priorities start at zero for default beans, negative for non-default. 35 | * 36 | * @see org.eclipse.sisu.inject.RankingFunction 37 | * @see BeanEntry#getRank() 38 | */ 39 | @Target( value = { ElementType.TYPE } ) 40 | @Retention( RetentionPolicy.RUNTIME ) 41 | @Documented 42 | public @interface Priority 43 | { 44 | int value(); 45 | } 46 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/Typed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu; 14 | 15 | import java.lang.annotation.Documented; 16 | import java.lang.annotation.ElementType; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Restricts the visible types of a bean:
23 | *
24 | * 25 | *
26 |  * @Named
27 |  * @Typed( Widget.class, Service.class )
28 |  * public class PrinterWidget
29 |  *     extends AbstractWidget
30 |  *     implements Service
31 |  * {
32 |  *     //
33 |  * }
34 |  * 
35 | */ 36 | @Target( value = { ElementType.TYPE } ) 37 | @Retention( RetentionPolicy.RUNTIME ) 38 | @Documented 39 | public @interface Typed 40 | { 41 | Class[] value() default {}; 42 | } 43 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/bean/BeanBinder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.bean; 14 | 15 | import com.google.inject.TypeLiteral; 16 | import com.google.inject.spi.TypeEncounter; 17 | 18 | /** 19 | * Provides custom {@link PropertyBinder}s for beans that contain one or more properties. 20 | */ 21 | public interface BeanBinder 22 | { 23 | /** 24 | * Returns the appropriate {@link PropertyBinder} for the given bean type. 25 | * 26 | * @param type The bean type 27 | * @param encounter The Guice type encounter 28 | * @return Property binder for the given type; {@code null} if no binder is applicable 29 | */ 30 | PropertyBinder bindBean( TypeLiteral type, TypeEncounter encounter ); 31 | } 32 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/bean/IgnoreSetters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.bean; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Inherited; 17 | import java.lang.annotation.Retention; 18 | import java.lang.annotation.RetentionPolicy; 19 | import java.lang.annotation.Target; 20 | 21 | /** 22 | * Annotates class hierarchies that don't want setter injection. 23 | */ 24 | @Target( value = ElementType.TYPE ) 25 | @Retention( RetentionPolicy.RUNTIME ) 26 | @Inherited 27 | public @interface IgnoreSetters 28 | { 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/bean/PropertyBinder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.bean; 14 | 15 | /** 16 | * Provides custom {@link PropertyBinding}s for bean properties such as fields or setter methods. 17 | */ 18 | public interface PropertyBinder 19 | { 20 | /** 21 | * Returns the appropriate {@link PropertyBinding} for the given bean property. 22 | * 23 | * @param property The bean property 24 | * @return Binding for the given property; {@code null} if no binding is applicable 25 | */ 26 | PropertyBinding bindProperty( BeanProperty property ); 27 | 28 | /** 29 | * Binders may return {@code LAST_BINDING} to indicate they are done binding a bean. 30 | */ 31 | PropertyBinding LAST_BINDING = new PropertyBinding() 32 | { 33 | public void injectProperty( final B bean ) 34 | { 35 | throw new UnsupportedOperationException( "LAST_BINDING" ); 36 | } 37 | }; 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/bean/PropertyBinding.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.bean; 14 | 15 | /** 16 | * Represents a bean property that has been bound by a {@link PropertyBinder}. 17 | */ 18 | public interface PropertyBinding 19 | { 20 | /** 21 | * Injects the current bound value into the property of the given bean. 22 | * 23 | * @param bean The bean to inject 24 | */ 25 | void injectProperty( B bean ); 26 | } 27 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/bean/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | /** 14 | * Customizable injection of bean properties, based on https://github.com/google/guice/wiki/CustomInjections. 15 | *

16 | * For example: 17 | * 18 | *

19 |  * new AbstractModule() {
20 |  *   @Override protected void configure() {
21 |  *     bindListener( Matchers.any(), new BeanListener( new MyBeanBinder() ) );
22 |  *   }
23 |  * }
24 | * {@code MyBeanBinder} will be asked to supply a {@link org.eclipse.sisu.bean.PropertyBinder} for each bean type, say Foo. 25 | *

26 | * That {@code PropertyBinder} will be asked to supply a {@link org.eclipse.sisu.bean.PropertyBinding} for each property (field or setter) in Foo. 27 | *

28 | * Those {@code PropertyBinding}s are then used to automatically configure any injected instances of Foo. 29 | */ 30 | package org.eclipse.sisu.bean; 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/inject/AnnotatedSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.inject; 14 | 15 | import java.lang.annotation.Annotation; 16 | 17 | import com.google.inject.Binder; 18 | import com.google.inject.Binding; 19 | 20 | /** 21 | * Binding source locations can implement this interface to supply annotations to the {@link BeanLocator}. 22 | * 23 | * @see Binder#withSource(Object) 24 | */ 25 | public interface AnnotatedSource 26 | { 27 | /** 28 | * Returns the annotation of the given type that is associated with the binding. 29 | * 30 | * @param binding The binding 31 | * @param annotationType The annotation type 32 | * @return The associated annotation; {@code null} if no such annotation exists 33 | */ 34 | T getAnnotation( Binding binding, Class annotationType ); 35 | } 36 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/inject/DeferredClass.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.inject; 14 | 15 | /** 16 | * Placeholder {@link Class}; postpones classloading until absolutely necessary. 17 | */ 18 | public interface DeferredClass 19 | { 20 | /** 21 | * Retrieves the class, for example from a cache or a class loader. 22 | * 23 | * @return Class instance 24 | */ 25 | Class load() 26 | throws TypeNotPresentException; 27 | 28 | /** 29 | * Returns the name of the deferred class. 30 | * 31 | * @return Class name 32 | */ 33 | String getName(); 34 | 35 | /** 36 | * Returns a provider based on the deferred class. 37 | * 38 | * @return Deferred provider 39 | */ 40 | DeferredProvider asProvider(); 41 | } 42 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/inject/DeferredProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.inject; 14 | 15 | import com.google.inject.Provider; 16 | 17 | /** 18 | * {@link Provider} backed by a {@link DeferredClass}. 19 | */ 20 | public interface DeferredProvider 21 | extends Provider 22 | { 23 | /** 24 | * @return Deferred implementation class 25 | */ 26 | DeferredClass getImplementationClass(); 27 | } 28 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/inject/RankingFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.inject; 14 | 15 | import com.google.inject.Binding; 16 | 17 | /** 18 | * Assigns each {@link Binding} a rank according to some function; higher ranks take precedence over lower ranks. 19 | */ 20 | public interface RankingFunction 21 | { 22 | /** 23 | * Estimates the maximum rank this function may assign to a {@link Binding}. 24 | * 25 | * @return Maximum rank 26 | * @see BindingPublisher#maxBindingRank() 27 | */ 28 | int maxRank(); 29 | 30 | /** 31 | * Assigns a numeric rank to the given binding. 32 | * 33 | * @param binding The binding 34 | * @return Assigned rank 35 | */ 36 | int rank( Binding binding ); 37 | } 38 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/launch/BundlePlan.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.launch; 14 | 15 | import org.eclipse.sisu.inject.BindingPublisher; 16 | import org.osgi.framework.Bundle; 17 | 18 | /** 19 | * Something that can prepare {@link BindingPublisher}s for component bundles. 20 | */ 21 | public interface BundlePlan 22 | { 23 | /** 24 | * Prepares a {@link BindingPublisher} of components for the given bundle. 25 | * 26 | * @param bundle The bundle 27 | * @return Publisher of bindings; {@code null} if the plan doesn't apply 28 | */ 29 | BindingPublisher prepare( Bundle bundle ); 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | /** 14 | * Injectable API for Sisu components (a.k.a beans). 15 | */ 16 | package org.eclipse.sisu; 17 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/space/AnnotationVisitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.space; 14 | 15 | /** 16 | * Something that can visit annotation declarations. 17 | */ 18 | public interface AnnotationVisitor 19 | { 20 | /** 21 | * Enters the annotation declaration. 22 | */ 23 | void enterAnnotation(); 24 | 25 | /** 26 | * Visits an element of the declared annotation. 27 | * 28 | * @param name The element name 29 | * @param value The element value 30 | */ 31 | void visitElement( String name, Object value ); 32 | 33 | /** 34 | * Leaves the annotation declaration. 35 | */ 36 | void leaveAnnotation(); 37 | } 38 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/space/ClassFinder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.space; 14 | 15 | import java.net.URL; 16 | import java.util.Enumeration; 17 | 18 | /** 19 | * Finds (and optionally filters) {@link Class} resources from {@link ClassSpace}s. 20 | */ 21 | public interface ClassFinder 22 | { 23 | /** 24 | * Searches the given {@link ClassSpace} for {@link Class} resources. 25 | * 26 | * @param space The space to search 27 | * @return Sequence of Class URLs 28 | */ 29 | Enumeration findClasses( ClassSpace space ); 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/space/QualifiedTypeListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.space; 14 | 15 | import javax.inject.Qualifier; 16 | 17 | import com.google.inject.Binder; 18 | 19 | /** 20 | * Listens for types annotated with {@link Qualifier} annotations. 21 | */ 22 | public interface QualifiedTypeListener 23 | { 24 | /** 25 | * Invoked when the {@link QualifiedTypeVisitor} finds a qualified type. 26 | * 27 | * @param qualifiedType The qualified type 28 | * @param source The source of this type 29 | * @see Binder#withSource(Object) 30 | */ 31 | void hear( Class qualifiedType, Object source ); 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/space/SpaceVisitor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.space; 14 | 15 | import java.net.URL; 16 | 17 | /** 18 | * Something that can visit {@link ClassSpace}s. 19 | */ 20 | public interface SpaceVisitor 21 | { 22 | /** 23 | * Enters the class space. 24 | * 25 | * @param space The class space 26 | */ 27 | void enterSpace( ClassSpace space ); 28 | 29 | /** 30 | * Visits a class resource in the class space. 31 | * 32 | * @param url The class resource URL 33 | * @return Class visitor; {@code null} if it is not interested in visiting the class 34 | */ 35 | ClassVisitor visitClass( URL url ); 36 | 37 | /** 38 | * Leaves the class space. 39 | */ 40 | void leaveSpace(); 41 | } 42 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/AbstractTypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.wire; 14 | 15 | import org.eclipse.sisu.inject.TypeArguments; 16 | 17 | import com.google.inject.Binder; 18 | import com.google.inject.Module; 19 | import com.google.inject.TypeLiteral; 20 | import com.google.inject.matcher.Matchers; 21 | import com.google.inject.spi.TypeConverter; 22 | 23 | /** 24 | * Abstract {@link TypeConverter} {@link Module} that automatically registers the converter based on the type argument. 25 | */ 26 | public abstract class AbstractTypeConverter 27 | implements TypeConverter, Module 28 | { 29 | public final void configure( final Binder binder ) 30 | { 31 | // make sure we pick up the right super type argument, i.e. Foo from AbstractTypeConverter 32 | final TypeLiteral superType = TypeLiteral.get( getClass() ).getSupertype( AbstractTypeConverter.class ); 33 | binder.convertToTypes( Matchers.only( TypeArguments.get( superType, 0 ) ), this ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/FileTypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.wire; 14 | 15 | import java.io.File; 16 | 17 | import com.google.inject.Module; 18 | import com.google.inject.TypeLiteral; 19 | import com.google.inject.spi.TypeConverter; 20 | 21 | /** 22 | * {@link TypeConverter} {@link Module} that converts constants to {@link File}s. 23 | */ 24 | final class FileTypeConverter 25 | extends AbstractTypeConverter 26 | { 27 | public Object convert( final String value, final TypeLiteral toType ) 28 | { 29 | return new File( value ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/ParameterKeys.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.wire; 14 | 15 | import java.util.Map; 16 | 17 | import org.eclipse.sisu.Parameters; 18 | 19 | import com.google.inject.Key; 20 | 21 | /** 22 | * Useful {@link Key}s for binding {@link Parameters}. 23 | */ 24 | @SuppressWarnings( "rawtypes" ) 25 | public interface ParameterKeys 26 | { 27 | /** 28 | * {@link Key}.get( Map.class, {@link Parameters}.class ); 29 | */ 30 | Key PROPERTIES = Key.get( Map.class, Parameters.class ); 31 | 32 | /** 33 | * {@link Key}.get( String[].class, {@link Parameters}.class ); 34 | */ 35 | Key ARGUMENTS = Key.get( String[].class, Parameters.class ); 36 | } 37 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/PathTypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.wire; 14 | 15 | import java.io.File; 16 | import java.nio.file.Path; 17 | 18 | import com.google.inject.Module; 19 | import com.google.inject.TypeLiteral; 20 | import com.google.inject.spi.TypeConverter; 21 | 22 | /** 23 | * {@link TypeConverter} {@link Module} that converts constants to {@link Path}s. 24 | */ 25 | final class PathTypeConverter 26 | extends AbstractTypeConverter 27 | { 28 | public Object convert( final String value, final TypeLiteral toType ) 29 | { 30 | return new File( value ).toPath(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/URLTypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.wire; 14 | 15 | import java.net.MalformedURLException; 16 | import java.net.URL; 17 | 18 | import com.google.inject.Module; 19 | import com.google.inject.ProvisionException; 20 | import com.google.inject.TypeLiteral; 21 | import com.google.inject.spi.TypeConverter; 22 | 23 | /** 24 | * {@link TypeConverter} {@link Module} that converts constants to {@link URL}s. 25 | */ 26 | final class URLTypeConverter 27 | extends AbstractTypeConverter 28 | { 29 | public Object convert( final String value, final TypeLiteral toType ) 30 | { 31 | try 32 | { 33 | return new URL( value ); 34 | } 35 | catch ( final MalformedURLException e ) 36 | { 37 | throw new ProvisionException( e.toString() ); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/wire/Wiring.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.wire; 14 | 15 | import com.google.inject.Key; 16 | 17 | /** 18 | * Something that can supply bindings for unresolved dependency {@link Key}s. 19 | */ 20 | public interface Wiring 21 | { 22 | /** 23 | * Attempts to satisfy the given dependency by applying a local binding. 24 | * 25 | * @param key The dependency key 26 | * @return {@code true} if the wiring succeeded; otherwise {@code false} 27 | */ 28 | boolean wire( Key key ); 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/BeanEntry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.sonatype.inject; 14 | 15 | import java.lang.annotation.Annotation; 16 | 17 | /** 18 | * @deprecated Replaced by {@link org.eclipse.sisu.BeanEntry org.eclipse.sisu.BeanEntry} 19 | */ 20 | @Deprecated 21 | public interface BeanEntry 22 | extends org.eclipse.sisu.BeanEntry 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/BeanScanning.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.sonatype.inject; 14 | 15 | /** 16 | * @deprecated Replaced by {@link org.eclipse.sisu.space.BeanScanning org.eclipse.sisu.space.BeanScanning} 17 | */ 18 | @Deprecated 19 | public enum BeanScanning 20 | { 21 | ON, OFF, CACHE, INDEX, GLOBAL_INDEX 22 | } 23 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/Description.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.sonatype.inject; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Retention; 17 | import java.lang.annotation.RetentionPolicy; 18 | import java.lang.annotation.Target; 19 | 20 | /** 21 | * @deprecated Replaced by {@link org.eclipse.sisu.Description org.eclipse.sisu.Description} 22 | */ 23 | @Deprecated 24 | @Target( value = { ElementType.TYPE } ) 25 | @Retention( RetentionPolicy.RUNTIME ) 26 | public @interface Description 27 | { 28 | String value(); 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/EagerSingleton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.sonatype.inject; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Retention; 17 | import java.lang.annotation.RetentionPolicy; 18 | import java.lang.annotation.Target; 19 | 20 | /** 21 | * @deprecated Replaced by {@link org.eclipse.sisu.EagerSingleton org.eclipse.sisu.EagerSingleton} 22 | */ 23 | @Deprecated 24 | @Target( value = { ElementType.TYPE } ) 25 | @Retention( RetentionPolicy.RUNTIME ) 26 | public @interface EagerSingleton 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/Mediator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.sonatype.inject; 14 | 15 | import java.lang.annotation.Annotation; 16 | 17 | /** 18 | * @deprecated Replaced by {@link org.eclipse.sisu.Mediator org.eclipse.sisu.Mediator} 19 | */ 20 | @Deprecated 21 | public interface Mediator 22 | { 23 | void add( BeanEntry entry, W watcher ) 24 | throws Exception; 25 | 26 | void remove( BeanEntry entry, W watcher ) 27 | throws Exception; 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/Nullable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.sonatype.inject; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Retention; 17 | import java.lang.annotation.RetentionPolicy; 18 | import java.lang.annotation.Target; 19 | 20 | /** 21 | * @deprecated Replaced by {@link org.eclipse.sisu.Nullable org.eclipse.sisu.Nullable} 22 | */ 23 | @Deprecated 24 | @Target( value = { ElementType.FIELD, ElementType.PARAMETER } ) 25 | @Retention( RetentionPolicy.RUNTIME ) 26 | public @interface Nullable 27 | { 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/Parameters.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.sonatype.inject; 14 | 15 | import java.lang.annotation.ElementType; 16 | import java.lang.annotation.Retention; 17 | import java.lang.annotation.RetentionPolicy; 18 | import java.lang.annotation.Target; 19 | 20 | import javax.inject.Qualifier; 21 | 22 | /** 23 | * @deprecated Replaced by {@link org.eclipse.sisu.Parameters org.eclipse.sisu.Parameters} 24 | */ 25 | @Deprecated 26 | @Target( value = { ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD } ) 27 | @Retention( RetentionPolicy.RUNTIME ) 28 | @Qualifier 29 | public @interface Parameters 30 | { 31 | } 32 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/main/java/org/sonatype/inject/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | /** 14 | * Deprecated; new applications should use {@link org.eclipse.sisu}. 15 | */ 16 | package org.sonatype.inject; 17 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/site/markdown/lifecycle.md: -------------------------------------------------------------------------------- 1 | # Lifecycle Support 2 | 3 | Each Sisu managed bean/component may optionally use annotations on methods to be called whenever the bean is started or stopped. 4 | 5 | Those are 6 | 7 | Annotation | Method called... | Leveraged Guice Hook 8 | --- | --- 9 | `org.eclipse.sisu.PostConstruct` (or `javax.annotation.PostConstruct`) | Before bean is started | [`com.google.inject.spi.InjectionListener.afterInjection(...)`](https://google.github.io/guice/api-docs/6.0.0/javadoc/com/google/inject/spi/InjectionListener.html#afterInjection(I)) 10 | `org.eclipse.sisu.PreDestroy` (or `javax.annotation.PreDestroy`) | Before bean is stopped | Is not called by default, only via [Plexus API](../org.eclipse.sisu.plexus/apidocs/org/codehaus/plexus/DefaultPlexusContainer.html). 11 | 12 | The annotations defined in [JSR 250](https://jcp.org/en/jsr/detail?id=250) are recognized in addition to the native Sisu ones when their classes are detected in the class path. 13 | 14 | The support needs to be explicitly enabled by passing an instance of [`org.eclipse.sisu.bean.LifecycleModule`](apidocs/org/eclipse/sisu/bean/LifecycleModule.html) when creating the `Injector`. -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/site/markdown/named-index.md: -------------------------------------------------------------------------------- 1 | # Named Index 2 | 3 | Often Sisu's `SpaceModule` doesn't scan the full classpath at run time (for relevant annotations) but relies on a pre-generated index at `META-INF/sisu/javax.inject.Named`. This file contains the fully qualified class names (one class name per line). The line separator may be either `\n`, `\r` or `\r\n`. 4 | 5 | ## Generate the named index 6 | 7 | There are two different ways how to create such an index file: 8 | 9 | 1. By leveraging the Java annotation processor in [`org.eclipse.sisu.space.SisuIndexAPT6`](https://github.com/eclipse-sisu/sisu-project/blob/main/org.eclipse.sisu.inject/src/main/java/org/eclipse/sisu/space/SisuIndexAPT6.java) to generate the index. One needs to enable it via [`javac -processor org.eclipse.sisu.space.SisuIndexAPT6`](https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html#annotation-processing) or with the according [`maven-compiler-plugin` parameter `annotationProcessors`](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessors). 10 | 2. By leveraging the dedicated [Maven plugin](../sisu-maven-plugin/index.html) 11 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/site/resources/5min-demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/site/resources/5min-demo.png -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 15 | 25 | 27 | 28 |

29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/BaseTests.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021-present Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu; 12 | 13 | import java.lang.annotation.ElementType; 14 | import java.lang.annotation.Retention; 15 | import java.lang.annotation.RetentionPolicy; 16 | import java.lang.annotation.Target; 17 | 18 | import org.junit.jupiter.api.Tag; 19 | 20 | /** 21 | * Marks base tests that don't depend on Guice or injection. 22 | */ 23 | @Target( { ElementType.TYPE, ElementType.METHOD } ) 24 | @Retention( RetentionPolicy.RUNTIME ) 25 | @Tag( "base" ) 26 | public @interface BaseTests 27 | { 28 | // marker 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/Base.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | public class Base 14 | { 15 | protected final StringBuilder results = new StringBuilder(); 16 | 17 | public String results() 18 | { 19 | return results.toString(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/HiddenPackage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.inject.Singleton; 14 | 15 | @Singleton 16 | public class HiddenPackage 17 | extends HiddenProtected 18 | { 19 | @Override 20 | void c() 21 | { 22 | results.append( "!" ); 23 | } 24 | 25 | @Override 26 | void x() 27 | { 28 | results.append( "!" ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/HiddenPrivate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.inject.Singleton; 14 | 15 | @Singleton 16 | public class HiddenPrivate 17 | extends HiddenPackage 18 | { 19 | private void d() 20 | { 21 | results.append( "!" ); 22 | } 23 | 24 | private void w() 25 | { 26 | results.append( "!" ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/HiddenProtected.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.inject.Singleton; 14 | 15 | @Singleton 16 | public class HiddenProtected 17 | extends HiddenPublic 18 | { 19 | @Override 20 | protected void b() 21 | { 22 | results.append( "!" ); 23 | } 24 | 25 | @Override 26 | protected void y() 27 | { 28 | results.append( "!" ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/HiddenPublic.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.inject.Singleton; 14 | 15 | @Singleton 16 | public class HiddenPublic 17 | extends Private 18 | { 19 | @Override 20 | public void a() 21 | { 22 | results.append( "!" ); 23 | } 24 | 25 | @Override 26 | public void z() 27 | { 28 | results.append( "!" ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/OverriddenPackage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class OverriddenPackage 19 | extends OverriddenProtected 20 | { 21 | @Override 22 | @PostConstruct 23 | void c() 24 | { 25 | results.append( "C" ); 26 | } 27 | 28 | @Override 29 | @PreDestroy 30 | void x() 31 | { 32 | results.append( "X" ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/OverriddenPrivate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class OverriddenPrivate 19 | extends OverriddenPackage 20 | { 21 | @PostConstruct 22 | private void d() 23 | { 24 | results.append( "D" ); 25 | } 26 | 27 | @PreDestroy 28 | private void w() 29 | { 30 | results.append( "W" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/OverriddenProtected.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class OverriddenProtected 19 | extends OverriddenPublic 20 | { 21 | @Override 22 | @PostConstruct 23 | protected void b() 24 | { 25 | results.append( "B" ); 26 | } 27 | 28 | @Override 29 | @PreDestroy 30 | protected void y() 31 | { 32 | results.append( "Y" ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/OverriddenPublic.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class OverriddenPublic 19 | extends Private 20 | { 21 | @Override 22 | @PostConstruct 23 | public void a() 24 | { 25 | results.append( "A" ); 26 | } 27 | 28 | @Override 29 | @PreDestroy 30 | public void z() 31 | { 32 | results.append( "Z" ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/Package.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class Package 19 | extends Protected 20 | { 21 | @PostConstruct 22 | void c() 23 | { 24 | results.append( "c" ); 25 | } 26 | 27 | @PreDestroy 28 | void x() 29 | { 30 | results.append( "x" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/Private.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class Private 19 | extends Package 20 | { 21 | @PostConstruct 22 | private void d() 23 | { 24 | results.append( "d" ); 25 | } 26 | 27 | @PreDestroy 28 | private void w() 29 | { 30 | results.append( "w" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/Protected.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class Protected 19 | extends Public 20 | { 21 | @PostConstruct 22 | protected void b() 23 | { 24 | results.append( "b" ); 25 | } 26 | 27 | @PreDestroy 28 | protected void y() 29 | { 30 | results.append( "y" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/alpha/Public.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.alpha; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class Public 19 | extends Base 20 | { 21 | @PostConstruct 22 | public void a() 23 | { 24 | results.append( "a" ); 25 | } 26 | 27 | @PreDestroy 28 | public void z() 29 | { 30 | results.append( "z" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/HiddenPackage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.inject.Singleton; 14 | 15 | @Singleton 16 | public class HiddenPackage 17 | extends HiddenProtected 18 | { 19 | void c() 20 | { 21 | results.append( "!" ); 22 | } 23 | 24 | void x() 25 | { 26 | results.append( "!" ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/HiddenPrivate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.inject.Singleton; 14 | 15 | @Singleton 16 | public class HiddenPrivate 17 | extends HiddenPackage 18 | { 19 | private void d() 20 | { 21 | results.append( "!" ); 22 | } 23 | 24 | private void w() 25 | { 26 | results.append( "!" ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/HiddenProtected.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.inject.Singleton; 14 | 15 | @Singleton 16 | public class HiddenProtected 17 | extends HiddenPublic 18 | { 19 | @Override 20 | protected void b() 21 | { 22 | results.append( "!" ); 23 | } 24 | 25 | @Override 26 | protected void y() 27 | { 28 | results.append( "!" ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/HiddenPublic.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.inject.Singleton; 14 | 15 | import org.eclipse.sisu.bean.alpha.Private; 16 | 17 | @Singleton 18 | public class HiddenPublic 19 | extends Private 20 | { 21 | @Override 22 | public void a() 23 | { 24 | results.append( "!" ); 25 | } 26 | 27 | @Override 28 | public void z() 29 | { 30 | results.append( "!" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/OverriddenPackage.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class OverriddenPackage 19 | extends OverriddenProtected 20 | { 21 | @PostConstruct 22 | void c() 23 | { 24 | results.append( "C" ); 25 | } 26 | 27 | @PreDestroy 28 | void x() 29 | { 30 | results.append( "X" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/OverriddenPrivate.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class OverriddenPrivate 19 | extends OverriddenPackage 20 | { 21 | @PostConstruct 22 | private void d() 23 | { 24 | results.append( "D" ); 25 | } 26 | 27 | @PreDestroy 28 | private void w() 29 | { 30 | results.append( "W" ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/OverriddenProtected.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | @Singleton 18 | public class OverriddenProtected 19 | extends OverriddenPublic 20 | { 21 | @Override 22 | @PostConstruct 23 | protected void b() 24 | { 25 | results.append( "B" ); 26 | } 27 | 28 | @Override 29 | @PreDestroy 30 | protected void y() 31 | { 32 | results.append( "Y" ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/bean/beta/OverriddenPublic.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.bean.beta; 12 | 13 | import javax.annotation.PostConstruct; 14 | import javax.annotation.PreDestroy; 15 | import javax.inject.Singleton; 16 | 17 | import org.eclipse.sisu.bean.alpha.Private; 18 | 19 | @Singleton 20 | public class OverriddenPublic 21 | extends Private 22 | { 23 | @Override 24 | @PostConstruct 25 | public void a() 26 | { 27 | results.append( "A" ); 28 | } 29 | 30 | @Override 31 | @PreDestroy 32 | public void z() 33 | { 34 | results.append( "Z" ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/launch/Custom1TestCase.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.launch; 12 | 13 | import javax.inject.Inject; 14 | 15 | import com.google.inject.Binder; 16 | 17 | /** 18 | * Still JUnit3 based test 19 | * Execute with JUnit3 runner. 20 | */ 21 | public final class Custom1TestCase 22 | extends InjectedTestCase 23 | { 24 | @Override 25 | public void configure( final Binder binder ) 26 | { 27 | // override automatic binding 28 | binder.bind( Foo.class ).to( NamedFoo.class ); 29 | } 30 | 31 | @Inject 32 | Foo bean; 33 | 34 | public void testPerTestCaseCustomization() 35 | { 36 | assertTrue( bean instanceof NamedFoo ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/launch/Custom2Test.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.launch; 12 | 13 | import javax.inject.Inject; 14 | 15 | import com.google.inject.Binder; 16 | import org.junit.jupiter.api.Test; 17 | 18 | import static org.junit.jupiter.api.Assertions.assertTrue; 19 | 20 | final class Custom2Test 21 | extends InjectedTest 22 | { 23 | @Override 24 | public void configure( final Binder binder ) 25 | { 26 | // override automatic binding 27 | binder.bind( Foo.class ).to( TaggedFoo.class ); 28 | } 29 | 30 | @Inject 31 | Foo bean; 32 | 33 | @Test 34 | // @org.junit.jupiter.api.Test 35 | // @org.testng.annotations.Test 36 | public void testPerTestCaseCustomization() 37 | { 38 | assertTrue( bean instanceof TaggedFoo ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/launch/Custom3TestCase.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.launch; 12 | 13 | import javax.inject.Inject; 14 | import javax.inject.Named; 15 | 16 | import java.util.Properties; 17 | 18 | /** 19 | * Still JUnit3 based test 20 | * Execute with JUnit3 runner. 21 | */ 22 | public final class Custom3TestCase 23 | extends InjectedTestCase 24 | { 25 | @Override 26 | public void configure( final Properties properties ) 27 | { 28 | properties.put( "hint", "NameTag" ); 29 | properties.put( "port", "8080" ); 30 | } 31 | 32 | @Inject 33 | @Named( "${hint}" ) 34 | Foo bean; 35 | 36 | @Inject 37 | @Named( "${port}" ) 38 | int port; 39 | 40 | public void testPerTestCaseCustomization() 41 | { 42 | assertTrue( bean instanceof NamedAndTaggedFoo ); 43 | 44 | assertEquals( 8080, port ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/launch/RequireBindingsTestCase.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.launch; 12 | 13 | import javax.inject.Inject; 14 | 15 | import com.google.inject.Binder; 16 | 17 | /** 18 | * Still JUnit3 based test 19 | * Execute with JUnit3 runner. 20 | */ 21 | public final class RequireBindingsTestCase 22 | extends InjectedTestCase 23 | { 24 | @Override 25 | public void configure( final Binder binder ) 26 | { 27 | binder.requireExplicitBindings(); 28 | } 29 | 30 | @Inject 31 | Foo bean; 32 | 33 | public void testRequireExplicitBindings() 34 | { 35 | assertNotNull( bean ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/java/org/eclipse/sisu/wire/FileTypeConverterTest.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.wire; 12 | 13 | import java.io.File; 14 | 15 | import com.google.inject.AbstractModule; 16 | import com.google.inject.Guice; 17 | import com.google.inject.Key; 18 | import com.google.inject.name.Names; 19 | 20 | import org.junit.jupiter.api.Test; 21 | 22 | import static org.junit.jupiter.api.Assertions.assertEquals; 23 | 24 | class FileTypeConverterTest 25 | { 26 | @Test 27 | void testFileConversion() 28 | { 29 | final File file = Guice.createInjector( new FileTypeConverter(), new AbstractModule() 30 | { 31 | @Override 32 | protected void configure() 33 | { 34 | bindConstant().annotatedWith( Names.named( "file" ) ).to( "work/temp" ); 35 | } 36 | } ).getInstance( Key.get( File.class, Names.named( "file" ) ) ); 37 | 38 | assertEquals( "work" + File.separator + "temp", file.getPath() ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/Incomplete.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/Incomplete.class -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/IncompleteBase.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/IncompleteBase.class -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/launch/inject.properties: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Copyright (c) 2010-present Sonatype, Inc. 3 | # All rights reserved. This program and the accompanying materials 4 | # are made available under the terms of the Eclipse Public License v1.0 5 | # which accompanies this distribution, and is available at 6 | # http://www.eclipse.org/legal/epl-v10.html 7 | # 8 | # Contributors: 9 | # Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | ############################################################################### 11 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/META-INF/sisu/javax.inject.Named: -------------------------------------------------------------------------------- 1 | # comment 2 | org.eclipse.sisu.space.QualifiedScanningTest$C 3 | 4 | some_missing_class 5 | 6 | org.eclipse.sisu.space.QualifiedScanningTest$D 7 | 8 | # duplicate entry 9 | org.eclipse.sisu.space.QualifiedScanningTest$C 10 | 11 | -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/blank.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/blank.zip -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/broken.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/broken.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/class path.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/class path.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/corrupt.manifest/META-INF/MANIFEST.MF/placeholder.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/corrupt.manifest/META-INF/MANIFEST.MF/placeholder.txt -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/embedded.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/embedded.zip -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/empty.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/empty.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/empty.zip: -------------------------------------------------------------------------------- 1 | PK -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/icu4j-2.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/icu4j-2.6.1.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/logging_bundle.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/logging_bundle.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/nested.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/nested.war -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/simple.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/simple.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/simple.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/simple.zip -------------------------------------------------------------------------------- /org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/simple_bundle.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.inject/src/test/resources/org/eclipse/sisu/space/simple_bundle.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.mojos/src/it/settings.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | -------------------------------------------------------------------------------- /org.eclipse.sisu.mojos/src/it/simple/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | org.eclipse.sisu.mojos.it 4 | simple 5 | 1.0.0-SNAPSHOT 6 | 7 | 8 | 9 | javax.inject 10 | javax.inject 11 | 1 12 | 13 | 14 | 15 | 16 | 17 | 18 | org.eclipse.sisu 19 | sisu-maven-plugin 20 | @project.version@ 21 | 22 | 23 | index-project 24 | 25 | main-index 26 | test-index 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.mojos/src/it/simple/src/main/java/simple/Test.java: -------------------------------------------------------------------------------- 1 | package simple; 2 | 3 | import javax.inject.Named; 4 | 5 | @Named 6 | public class Test { 7 | 8 | } -------------------------------------------------------------------------------- /org.eclipse.sisu.mojos/src/it/simple/verify.groovy: -------------------------------------------------------------------------------- 1 | // Basic IT: index is created and contains one class FQN 2 | 3 | File index = new File(basedir, 'target/classes/META-INF/sisu/javax.inject.Named'); 4 | assert index.isFile() 5 | assert index.text.contains('simple.Test') 6 | 7 | -------------------------------------------------------------------------------- /org.eclipse.sisu.mojos/src/main/resources/META-INF/m2e/lifecycle-mapping-metadata.xml: -------------------------------------------------------------------------------- 1 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | index 27 | main-index 28 | test-index 29 | 30 | 31 | 32 | 33 | true 34 | false 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.mojos/src/site/site.xml: -------------------------------------------------------------------------------- 1 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus.extender/META-INF/services/org.eclipse.sisu.launch.BundlePlan: -------------------------------------------------------------------------------- 1 | org.eclipse.sisu.plexus.PlexusBundlePlan 2 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus.extender/bnd.bnd: -------------------------------------------------------------------------------- 1 | Bundle-Name: Sisu-Plexus Extender (Incubation) 2 | Bundle-SymbolicName: org.eclipse.sisu.plexus.extender;singleton:=true 3 | Fragment-Host: org.eclipse.sisu.inject.extender 4 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus.extender/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Overview

4 | Implements Plexus semantics on top of Sisu and Google-Guice. 5 |

6 | This fragment bundle adds Plexus semantics to the Sisu-Inject extender bundle. 7 | 8 | 9 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus.extender/src/main/java/.gitignore: -------------------------------------------------------------------------------- 1 | # keep src folder around 2 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/bnd.bnd: -------------------------------------------------------------------------------- 1 | Bundle-Name: Sisu-Plexus (Incubation) 2 | Bundle-SymbolicName: org.eclipse.sisu.plexus;singleton:=true 3 | -exportcontents: org.eclipse.sisu.plexus.*,\ 4 | org.codehaus.plexus.* 5 | Import-Package: javax.inject,\ 6 | org.eclipse.sisu.*,\ 7 | com.google.inject;version="1.3",\ 8 | com.google.inject.binder;version="1.3",\ 9 | com.google.inject.matcher;version="1.3",\ 10 | com.google.inject.name;version="1.3",\ 11 | com.google.inject.spi;version="1.3",\ 12 | com.google.inject.util;version="1.3",\ 13 | org.osgi.framework;version="1.5",\ 14 | org.codehaus.classworlds,\ 15 | org.codehaus.plexus.classworlds.*,\ 16 | org.codehaus.plexus.util.*,\ 17 | *;resolution:=optional;version="!" 18 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Overview

4 | Implements Plexus semantics on top of Sisu and Google-Guice. 5 |

6 | Legacy applications can use the Plexus container API as usual: 7 |

 8 | ContainerConfiguration config = new DefaultContainerConfiguration();
 9 | // ... configure ...
10 | PlexusContainer container = null;
11 | try {
12 |   container = new DefaultPlexusContainer( config );
13 |   // ... execute/wait ...
14 | } finally {
15 |   if ( container != null ) {
16 |     container.dispose();
17 |   }
18 | }
19 |

20 | Sisu applications that want to re-use Plexus components can use the {@link org.eclipse.sisu.plexus.PlexusSpaceModule} wrapper: 21 |

22 | binder.install( new PlexusSpaceModule( space ) );
23 | 24 | 25 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/MutablePlexusContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus; 14 | 15 | import org.codehaus.plexus.classworlds.ClassWorld; 16 | import org.codehaus.plexus.logging.Logger; 17 | import org.codehaus.plexus.logging.LoggerManager; 18 | 19 | public interface MutablePlexusContainer 20 | extends PlexusContainer 21 | { 22 | LoggerManager getLoggerManager(); 23 | 24 | void setLoggerManager( LoggerManager loggerManager ); 25 | 26 | Logger getLogger(); 27 | 28 | ClassWorld getClassWorld(); 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/PlexusConstants.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus; 14 | 15 | import org.eclipse.sisu.plexus.Hints; 16 | 17 | public interface PlexusConstants 18 | { 19 | String PLEXUS_DEFAULT_HINT = Hints.DEFAULT_HINT; 20 | 21 | String PLEXUS_KEY = "plexus"; 22 | 23 | String GLOBAL_VISIBILITY = "global"; 24 | 25 | String REALM_VISIBILITY = "realm"; 26 | 27 | String SCANNING_ON = "on"; 28 | 29 | String SCANNING_OFF = "off"; 30 | 31 | String SCANNING_INDEX = "index"; 32 | 33 | String SCANNING_CACHE = "cache"; 34 | } 35 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/PlexusContainerException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus; 14 | 15 | public final class PlexusContainerException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public PlexusContainerException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public PlexusContainerException( final String message, final Throwable detail ) 26 | { 27 | super( message, detail ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/MapOrientedComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component; 14 | 15 | import java.util.Map; 16 | 17 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 18 | import org.codehaus.plexus.component.repository.ComponentRequirement; 19 | 20 | public interface MapOrientedComponent 21 | { 22 | void addComponentRequirement( ComponentRequirement requirement, Object value ) 23 | throws ComponentConfigurationException; 24 | 25 | void setComponentConfiguration( Map configuration ) 26 | throws ComponentConfigurationException; 27 | } 28 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/composition/CycleDetectedInComponentGraphException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.composition; 14 | 15 | public final class CycleDetectedInComponentGraphException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public CycleDetectedInComponentGraphException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public CycleDetectedInComponentGraphException( final String message, final Throwable detail ) 26 | { 27 | super( message, detail ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/ConfigurationListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator; 14 | 15 | public interface ConfigurationListener 16 | { 17 | void notifyFieldChangeUsingReflection( String name, Object value, Object component ); 18 | 19 | void notifyFieldChangeUsingSetter( String name, Object value, Object component ); 20 | } 21 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/ParameterizedConfigurationConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters; 14 | 15 | import java.lang.reflect.Type; 16 | 17 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 18 | import org.codehaus.plexus.component.configurator.ConfigurationListener; 19 | import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup; 20 | import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator; 21 | import org.codehaus.plexus.configuration.PlexusConfiguration; 22 | 23 | public interface ParameterizedConfigurationConverter 24 | extends ConfigurationConverter 25 | { 26 | Object fromConfiguration( ConverterLookup lookup, PlexusConfiguration configuration, Class type, 27 | Type[] typeArguments, Class enclosingType, ClassLoader loader, 28 | ExpressionEvaluator evaluator, ConfigurationListener listener ) 29 | throws ComponentConfigurationException; 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/BooleanConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class BooleanConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return boolean.class.equals( type ) || Boolean.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | return Boolean.valueOf( value ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ByteConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class ByteConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return byte.class.equals( type ) || Byte.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | try 30 | { 31 | return Byte.decode( value ); 32 | } 33 | catch ( final NumberFormatException e ) 34 | { 35 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to byte", e ); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/CharConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class CharConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return char.class.equals( type ) || Character.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | return Character.valueOf( value.charAt( 0 ) ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ClassConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class ClassConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return Class.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | try 30 | { 31 | return Class.forName( value ); 32 | } 33 | catch ( final Exception e ) 34 | { 35 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to Class", e ); 36 | } 37 | catch ( final LinkageError e ) 38 | { 39 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to Class", e ); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/DoubleConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class DoubleConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return double.class.equals( type ) || Double.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | try 30 | { 31 | return Double.valueOf( value ); 32 | } 33 | catch ( final NumberFormatException e ) 34 | { 35 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to double", e ); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/FloatConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class FloatConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return float.class.equals( type ) || Float.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | try 30 | { 31 | return Float.valueOf( value ); 32 | } 33 | catch ( final NumberFormatException e ) 34 | { 35 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to float", e ); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/IntConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class IntConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return int.class.equals( type ) || Integer.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | try 30 | { 31 | return Integer.decode( value ); 32 | } 33 | catch ( final NumberFormatException e ) 34 | { 35 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to int", e ); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/LongConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class LongConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return long.class.equals( type ) || Long.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | try 30 | { 31 | return Long.decode( value ); 32 | } 33 | catch ( final NumberFormatException e ) 34 | { 35 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to long", e ); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/ShortConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | 17 | public class ShortConverter 18 | extends AbstractBasicConverter 19 | { 20 | public boolean canConvert( final Class type ) 21 | { 22 | return short.class.equals( type ) || Short.class.equals( type ); 23 | } 24 | 25 | @Override 26 | public Object fromString( final String value ) 27 | throws ComponentConfigurationException 28 | { 29 | try 30 | { 31 | return Short.decode( value ); 32 | } 33 | catch ( final NumberFormatException e ) 34 | { 35 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to short", e ); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringBufferConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | public class StringBufferConverter 16 | extends AbstractBasicConverter 17 | { 18 | public boolean canConvert( final Class type ) 19 | { 20 | return StringBuffer.class.equals( type ); 21 | } 22 | 23 | @Override 24 | public Object fromString( final String value ) 25 | { 26 | return new StringBuffer( value ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringBuilderConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | public class StringBuilderConverter 16 | extends AbstractBasicConverter 17 | { 18 | public boolean canConvert( final Class type ) 19 | { 20 | return StringBuilder.class.equals( type ); 21 | } 22 | 23 | @Override 24 | public Object fromString( final String value ) 25 | { 26 | return new StringBuilder( value ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/StringConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | public class StringConverter 16 | extends AbstractBasicConverter 17 | { 18 | public boolean canConvert( final Class type ) 19 | { 20 | return String.class.equals( type ); 21 | } 22 | 23 | @Override 24 | public Object fromString( final String value ) 25 | { 26 | return value; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UriConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import java.net.URI; 16 | import java.net.URISyntaxException; 17 | 18 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 19 | 20 | public class UriConverter 21 | extends AbstractBasicConverter 22 | { 23 | public boolean canConvert( final Class type ) 24 | { 25 | return URI.class.equals( type ); 26 | } 27 | 28 | @Override 29 | public Object fromString( final String value ) 30 | throws ComponentConfigurationException 31 | { 32 | try 33 | { 34 | return new URI( value ); 35 | } 36 | catch ( final URISyntaxException e ) 37 | { 38 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to URI", e ); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/basic/UrlConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.basic; 14 | 15 | import java.net.MalformedURLException; 16 | import java.net.URL; 17 | 18 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 19 | 20 | public class UrlConverter 21 | extends AbstractBasicConverter 22 | { 23 | public boolean canConvert( final Class type ) 24 | { 25 | return URL.class.equals( type ); 26 | } 27 | 28 | @Override 29 | public Object fromString( final String value ) 30 | throws ComponentConfigurationException 31 | { 32 | try 33 | { 34 | return new URL( value ); 35 | } 36 | catch ( final MalformedURLException e ) 37 | { 38 | throw new ComponentConfigurationException( "Cannot convert '" + value + "' to URL", e ); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/converters/lookup/ConverterLookup.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.converters.lookup; 14 | 15 | import org.codehaus.plexus.component.configurator.ComponentConfigurationException; 16 | import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter; 17 | 18 | public interface ConverterLookup 19 | { 20 | void registerConverter( ConfigurationConverter converter ); 21 | 22 | ConfigurationConverter lookupConverterForType( Class type ) 23 | throws ComponentConfigurationException; 24 | } 25 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/expression/DefaultExpressionEvaluator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.expression; 14 | 15 | import java.io.File; 16 | 17 | public class DefaultExpressionEvaluator 18 | implements ExpressionEvaluator 19 | { 20 | public Object evaluate( final String expression ) 21 | { 22 | return expression; 23 | } 24 | 25 | public File alignToBaseDirectory( final File path ) 26 | { 27 | return path; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.expression; 14 | 15 | public final class ExpressionEvaluationException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public ExpressionEvaluationException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public ExpressionEvaluationException( final String message, final Throwable cause ) 26 | { 27 | super( message, cause ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/expression/ExpressionEvaluator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.expression; 14 | 15 | import java.io.File; 16 | 17 | public interface ExpressionEvaluator 18 | { 19 | Object evaluate( String expression ) 20 | throws ExpressionEvaluationException; 21 | 22 | File alignToBaseDirectory( File path ); 23 | } 24 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/configurator/expression/TypeAwareExpressionEvaluator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.configurator.expression; 14 | 15 | public interface TypeAwareExpressionEvaluator 16 | extends ExpressionEvaluator 17 | { 18 | Object evaluate( String expression, Class type ) 19 | throws ExpressionEvaluationException; 20 | } 21 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/factory/ComponentFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.factory; 14 | 15 | import org.codehaus.plexus.PlexusContainer; 16 | import org.codehaus.plexus.classworlds.realm.ClassRealm; 17 | import org.codehaus.plexus.component.repository.ComponentDescriptor; 18 | 19 | public interface ComponentFactory 20 | { 21 | String getId(); 22 | 23 | @SuppressWarnings( "rawtypes" ) 24 | Object newInstance( ComponentDescriptor cd, ClassRealm realm, PlexusContainer container ) 25 | throws ComponentInstantiationException; 26 | } 27 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/factory/ComponentInstantiationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.factory; 14 | 15 | public final class ComponentInstantiationException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public ComponentInstantiationException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public ComponentInstantiationException( final String message, final Throwable cause ) 26 | { 27 | super( message, cause ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/repository/ComponentRequirementList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.repository; 14 | 15 | import java.util.List; 16 | 17 | public final class ComponentRequirementList 18 | extends ComponentRequirement 19 | { 20 | // ---------------------------------------------------------------------- 21 | // Implementation fields 22 | // ---------------------------------------------------------------------- 23 | 24 | private List hints; 25 | 26 | // ---------------------------------------------------------------------- 27 | // Public methods 28 | // ---------------------------------------------------------------------- 29 | 30 | public void setRoleHints( final List hints ) 31 | { 32 | this.hints = hints; 33 | } 34 | 35 | public List getRoleHints() 36 | { 37 | return hints; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentLifecycleException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.repository.exception; 14 | 15 | public final class ComponentLifecycleException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public ComponentLifecycleException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public ComponentLifecycleException( final String message, final Throwable detail ) 26 | { 27 | super( message, detail ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/component/repository/exception/ComponentRepositoryException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.component.repository.exception; 14 | 15 | public final class ComponentRepositoryException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public ComponentRepositoryException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public ComponentRepositoryException( final String message, final Throwable detail ) 26 | { 27 | super( message, detail ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/configuration/PlexusConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.configuration; 14 | 15 | public interface PlexusConfiguration 16 | { 17 | String getName(); 18 | 19 | String getValue(); 20 | 21 | String getValue( String defaultValue ); 22 | 23 | void setValue( String value ); 24 | 25 | String[] getAttributeNames(); 26 | 27 | String getAttribute( String attributeName ); 28 | 29 | String getAttribute( String attributeName, String defaultValue ); 30 | 31 | void setAttribute( String name, String value ); 32 | 33 | PlexusConfiguration getChild( String childName ); 34 | 35 | PlexusConfiguration getChild( String childName, boolean create ); 36 | 37 | PlexusConfiguration[] getChildren(); 38 | 39 | PlexusConfiguration[] getChildren( String childName ); 40 | 41 | int getChildCount(); 42 | 43 | PlexusConfiguration getChild( int index ); 44 | 45 | void addChild( PlexusConfiguration child ); 46 | 47 | PlexusConfiguration addChild( String name, String value ); 48 | } 49 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/configuration/PlexusConfigurationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.configuration; 14 | 15 | public class PlexusConfigurationException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public PlexusConfigurationException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public PlexusConfigurationException( final String message, final Throwable detail ) 26 | { 27 | super( message, detail ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/context/Context.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.context; 14 | 15 | import java.util.Map; 16 | 17 | public interface Context 18 | { 19 | boolean contains( Object key ); 20 | 21 | void put( Object key, Object value ); 22 | 23 | Object get( Object key ) 24 | throws ContextException; 25 | 26 | Map getContextData(); 27 | } 28 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/context/ContextException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.context; 14 | 15 | public final class ContextException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public ContextException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public ContextException( final String message, final Throwable detail ) 26 | { 27 | super( message, detail ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/logging/AbstractLoggerManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.logging; 14 | 15 | import org.eclipse.sisu.bean.IgnoreSetters; 16 | import org.eclipse.sisu.plexus.Hints; 17 | 18 | @IgnoreSetters 19 | public abstract class AbstractLoggerManager 20 | implements LoggerManager 21 | { 22 | public final Logger getLoggerForComponent( final String role ) 23 | { 24 | return getLoggerForComponent( role, Hints.DEFAULT_HINT ); 25 | } 26 | 27 | public final void returnComponentLogger( final String role ) 28 | { 29 | returnComponentLogger( role, Hints.DEFAULT_HINT ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/logging/LogEnabled.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.logging; 14 | 15 | public interface LogEnabled 16 | { 17 | void enableLogging( Logger logger ); 18 | } 19 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/logging/LoggerManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.logging; 14 | 15 | public interface LoggerManager 16 | { 17 | String ROLE = LoggerManager.class.getName(); 18 | 19 | Logger getLoggerForComponent( String role ); 20 | 21 | Logger getLoggerForComponent( String role, String hint ); 22 | 23 | void returnComponentLogger( String role ); 24 | 25 | void returnComponentLogger( String role, String hint ); 26 | 27 | int getThreshold(); 28 | 29 | void setThreshold( int threshold ); 30 | 31 | void setThresholds( int threshold ); 32 | 33 | int getActiveLoggerCount(); 34 | } 35 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Configurable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | import org.codehaus.plexus.configuration.PlexusConfiguration; 16 | import org.codehaus.plexus.configuration.PlexusConfigurationException; 17 | 18 | public interface Configurable 19 | { 20 | void configure( PlexusConfiguration configuration ) 21 | throws PlexusConfigurationException; 22 | } 23 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Contextualizable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | import org.codehaus.plexus.context.Context; 16 | import org.codehaus.plexus.context.ContextException; 17 | 18 | public interface Contextualizable 19 | { 20 | void contextualize( Context context ) 21 | throws ContextException; 22 | } 23 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Disposable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public interface Disposable 16 | { 17 | void dispose(); 18 | } 19 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Initializable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public interface Initializable 16 | { 17 | void initialize() 18 | throws InitializationException; 19 | } 20 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/InitializationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public final class InitializationException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public InitializationException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public InitializationException( final String message, final Throwable cause ) 26 | { 27 | super( message, cause ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Serviceable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public interface Serviceable 16 | { 17 | void service( ServiceLocator locator ); 18 | } 19 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Startable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public interface Startable 16 | { 17 | void start() 18 | throws StartingException; 19 | 20 | void stop() 21 | throws StoppingException; 22 | } 23 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StartingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public final class StartingException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public StartingException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public StartingException( final String message, final Throwable cause ) 26 | { 27 | super( message, cause ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/StoppingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public final class StoppingException 16 | extends Exception 17 | { 18 | private static final long serialVersionUID = 1L; 19 | 20 | public StoppingException( final String message ) 21 | { 22 | super( message ); 23 | } 24 | 25 | public StoppingException( final String message, final Throwable cause ) 26 | { 27 | super( message, cause ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/codehaus/plexus/personality/plexus/lifecycle/phase/Suspendable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.codehaus.plexus.personality.plexus.lifecycle.phase; 14 | 15 | public interface Suspendable 16 | { 17 | void suspend(); 18 | 19 | void resume(); 20 | } 21 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/PlexusBean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.plexus; 14 | 15 | import java.util.Map.Entry; 16 | 17 | /** 18 | * Plexus bean mapping; from hint to instance. 19 | */ 20 | public interface PlexusBean 21 | extends Entry 22 | { 23 | /** 24 | * @return Human readable description 25 | */ 26 | String getDescription(); 27 | 28 | /** 29 | * @return Bean implementation class 30 | */ 31 | Class getImplementationClass(); 32 | } 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/PlexusBeanConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.plexus; 14 | 15 | import com.google.inject.TypeLiteral; 16 | 17 | /** 18 | * Service that converts values into various beans by following Plexus configuration rules. 19 | */ 20 | public interface PlexusBeanConverter 21 | { 22 | /** 23 | * Converts the given constant value to a bean of the given type. 24 | * 25 | * @param role The expected bean type 26 | * @param value The constant value 27 | * @return Bean of the given type, based on the given constant value 28 | */ 29 | T convert( TypeLiteral role, String value ); 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/PlexusBeanLocator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.plexus; 14 | 15 | import com.google.inject.TypeLiteral; 16 | 17 | /** 18 | * Service that locates beans of various types, using optional Plexus hints as a guide. 19 | */ 20 | public interface PlexusBeanLocator 21 | { 22 | /** 23 | * Locates beans of the given type, optionally filtered using the given named hints. 24 | * 25 | * @param role The expected bean type 26 | * @param hints The optional (canonical) hints 27 | * @return Sequence of Plexus bean mappings; ordered according to the given hints 28 | */ 29 | Iterable> locate( TypeLiteral role, String... hints ); 30 | } 31 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/PlexusBeanModule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.plexus; 14 | 15 | import com.google.inject.Binder; 16 | import com.google.inject.Module; 17 | 18 | /** 19 | * {@link Module}-like interface for contributing Plexus bindings with additional metadata. 20 | */ 21 | public interface PlexusBeanModule 22 | { 23 | /** 24 | * Contributes bindings and returns any associated {@link PlexusBeanSource} metadata. 25 | * 26 | * @see Module#configure(Binder) 27 | */ 28 | PlexusBeanSource configure( Binder binder ); 29 | } 30 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/PlexusBeanSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.plexus; 14 | 15 | /** 16 | * Source of Plexus component beans and associated metadata. 17 | */ 18 | public interface PlexusBeanSource 19 | { 20 | /** 21 | * Returns metadata associated with the given Plexus bean implementation. 22 | * 23 | * @param implementation The bean implementation 24 | * @return Metadata associated with the given bean 25 | */ 26 | PlexusBeanMetadata getBeanMetadata( Class implementation ); 27 | } 28 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/PlexusTypeListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.plexus; 14 | 15 | import org.codehaus.plexus.component.annotations.Component; 16 | import org.eclipse.sisu.inject.DeferredClass; 17 | import org.eclipse.sisu.space.QualifiedTypeListener; 18 | 19 | /** 20 | * {@link QualifiedTypeListener} that also listens for Plexus components. 21 | */ 22 | public interface PlexusTypeListener 23 | extends QualifiedTypeListener 24 | { 25 | /** 26 | * Invoked when the {@link PlexusTypeListener} finds a Plexus component. 27 | * 28 | * @param component The Plexus component 29 | * @param implementation The implementation 30 | * @param source The source of this component 31 | */ 32 | void hear( Component component, DeferredClass implementation, Object source ); 33 | } 34 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/Strategies.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | package org.eclipse.sisu.plexus; 14 | 15 | /** 16 | * Constants representing supported Plexus instantiation strategies. 17 | */ 18 | public interface Strategies 19 | { 20 | String LOAD_ON_START = "load-on-start"; 21 | 22 | String PER_LOOKUP = "per-lookup"; 23 | 24 | String SINGLETON = "singleton"; 25 | } 26 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/main/java/org/eclipse/sisu/plexus/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010-2024 Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License 2.0 5 | * which accompanies this distribution, and is available at 6 | * https://www.eclipse.org/legal/epl-2.0/ 7 | * 8 | * SPDX-License-Identifier: EPL-2.0 9 | * 10 | * Contributors: 11 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 12 | */ 13 | /** 14 | * Sisu-Plexus backend implementation. 15 | */ 16 | package org.eclipse.sisu.plexus; 17 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/site/markdown/index.md: -------------------------------------------------------------------------------- 1 | # Overview 2 | 3 | Plexus is an IoC container, originally developed at [Codehaus][codehaus] and meanwhile migrated to [GitHub][plexus-containers]. 4 | It relies on an [XML Descriptor][plexus-component-descriptor] which declares the dependencies of each component. 5 | 6 | This project provides a Plexus compatibility layer on top of Sisu which should be used instead when a project for some reasons still needs to rely on Plexus API. It support injection of both [legacy Plexus components](plexus-component-descriptor) as well as Sisu JSR 330 components. 7 | 8 | Plexus itself is considered legacy nowadays so new projects should no longer rely on Plexus API/metadata but rather use [JSR 330 annotations only][conversion-to-jsr330] (which converts them from Plexus to plain Sisu components). 9 | 10 | Even the projects listed in [Plexus Components][plexus-components] have been migrated meanwhile to JSR 330 annotations and do no longer rely on Plexus annotations/metadata (despite their name). 11 | 12 | [plexus-containers]: https://codehaus-plexus.github.io/plexus-containers/ 13 | [plexus-component-descriptor]: https://codehaus-plexus.github.io/plexus-containers/plexus-container-default/plexus-components.html 14 | [codehaus]: https://www.reddit.com/r/java/comments/2xciu8/codehaus_birthplace_of_many_java_oss_projects/ 15 | [plexus-components]: https://codehaus-plexus.github.io/ref/available-components.html 16 | [conversion-to-jsr330]: conversion-to-jsr330.html -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/java/org/eclipse/sisu/BaseTests.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021-present Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu; 12 | 13 | /** 14 | * Marks base tests that don't depend on Guice or injection. 15 | */ 16 | public interface BaseTests 17 | { 18 | // marker 19 | } 20 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/java/org/eclipse/sisu/plexus/BadBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.plexus; 12 | 13 | import org.codehaus.plexus.component.annotations.Component; 14 | 15 | @Component( role = int.class ) 16 | public class BadBean 17 | { 18 | } 19 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/java/org/eclipse/sisu/plexus/MissingClass.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2021-present Sonatype, Inc. and others. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.plexus; 12 | 13 | class MissingClass 14 | { 15 | // MissingClass.class will be deleted at test time 16 | } 17 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/java/org/eclipse/sisu/plexus/SimpleScanningExample.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.plexus; 12 | 13 | import org.eclipse.sisu.space.ClassSpace; 14 | import org.eclipse.sisu.space.URLClassSpace; 15 | 16 | public class SimpleScanningExample 17 | { 18 | public SimpleScanningExample() 19 | { 20 | final ClassSpace space = new URLClassSpace( getClass().getClassLoader() ); 21 | new PlexusXmlScanner( null, null, null ).scan( space, true ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/java/org/eclipse/sisu/plexus/TestBean.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2010-present Sonatype, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Stuart McCulloch (Sonatype, Inc.) - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.plexus; 12 | 13 | import org.codehaus.plexus.component.annotations.Component; 14 | 15 | @Component( role = Runnable.class, hint = "test", instantiationStrategy = Strategies.PER_LOOKUP, description = "Some Test", isolatedRealm = true ) 16 | public class TestBean 17 | implements Runnable 18 | { 19 | public void run() 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/java/org/eclipse/sisu/plexus/component/Jsr330Component1.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * All rights reserved. This program and the accompanying materials 3 | * are made available under the terms of the Eclipse Public License v1.0 4 | * which accompanies this distribution, and is available at 5 | * http://www.eclipse.org/legal/epl-v10.html 6 | * 7 | * Contributors: 8 | * Konrad Windszus - initial API and implementation 9 | *******************************************************************************/ 10 | package org.eclipse.sisu.plexus.component; 11 | 12 | import javax.inject.Inject; 13 | import javax.inject.Named; 14 | import javax.inject.Singleton; 15 | 16 | @Named 17 | @Singleton 18 | public class Jsr330Component1 19 | { 20 | 21 | protected final Jsr330Component2 component2; 22 | 23 | @Inject 24 | public Jsr330Component1( Jsr330Component2 component2 ) 25 | { 26 | this.component2 = component2; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/java/org/eclipse/sisu/plexus/component/Jsr330Component2.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * All rights reserved. This program and the accompanying materials 3 | * are made available under the terms of the Eclipse Public License v1.0 4 | * which accompanies this distribution, and is available at 5 | * http://www.eclipse.org/legal/epl-v10.html 6 | * 7 | * Contributors: 8 | * Konrad Windszus - initial API and implementation 9 | *******************************************************************************/ 10 | package org.eclipse.sisu.plexus.component; 11 | 12 | import javax.inject.Named; 13 | import javax.inject.Singleton; 14 | 15 | @Named 16 | @Singleton 17 | public class Jsr330Component2 18 | { 19 | public Jsr330Component2() 20 | { 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/META-INF/plexus/bad_components_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/META-INF/plexus/bad_components_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | org.eclipse.sisu.plexus.PlexusXmlScannerTest$DefaultBean 7 | 8 | 9 | 10 | 11 | beanField 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/META-INF/plexus/bad_components_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | org.eclipse.sisu.plexus.PlexusXmlScannerTest$DefaultBean 7 | 8 | 9 | 10 | 11 | no.such.class 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/META-INF/plexus/bad_components_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | no.such.class 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/META-INF/plexus/bad_plexus_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/META-INF/plexus/variable_components.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | org.eclipse.sisu.plexus.PlexusXmlScannerTest$DefaultBean 7 | 8 | 9 | foo 10 | ${some.value} 11 | bar 12 | 13 | 14 | 15 | 16 | debug 17 | 18 | 19 | org.eclipse.sisu.plexus.PlexusXmlScannerTest$DefaultBean 20 | 21 | 22 | 23 | 24 | again 25 | 26 | 27 | org.eclipse.sisu.plexus.PlexusXmlScannerTest$DefaultBean 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/component-jar/component-jar-0.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/org.eclipse.sisu.plexus/src/test/resources/component-jar/component-jar-0.1.jar -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/component-jar/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 15 | 4.0.0 16 | 17 | org.eclipse.sisu.plexus.tests 18 | component-jar 19 | 0.1 20 | 21 | 22 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/component-jar/src/main/java/org/eclipse/sisu/plexus/tests/SomeComponent.java: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Copyright (c) 2014 Takari, Inc. 3 | * All rights reserved. This program and the accompanying materials 4 | * are made available under the terms of the Eclipse Public License v1.0 5 | * which accompanies this distribution, and is available at 6 | * http://www.eclipse.org/legal/epl-v10.html 7 | * 8 | * Contributors: 9 | * Takari, Inc. - initial API and implementation 10 | *******************************************************************************/ 11 | package org.eclipse.sisu.plexus.tests; 12 | 13 | public class SomeComponent 14 | { 15 | 16 | } 17 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/component-jar/src/main/resources/META-INF/plexus/components.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | org.eclipse.sisu.plexus.tests.SomeComponent 16 | default 17 | org.eclipse.sisu.plexus.tests.SomeComponent 18 | 19 | false 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/invalid-plexus-components/META-INF/plexus/components.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | org.eclipse.sisu.plexus.component.Jsr330Component1 15 | default 16 | org.eclipse.sisu.plexus.component.Jsr330Component1 17 | 18 | false 19 | 20 | 21 | org.eclipse.sisu.plexus.component.Jsr330Component2 22 | default 23 | org.eclipse.sisu.plexus.component.Jsr330Component2 24 | 25 | false 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /org.eclipse.sisu.plexus/src/test/resources/invalid-sisu-components/META-INF/sisu/javax.inject.Named: -------------------------------------------------------------------------------- 1 | org.eclipse.sisu.plexus.component.Jsr330Component1 2 | org.eclipse.sisu.plexus.component.Jsr330Component2 -------------------------------------------------------------------------------- /src/site/markdown/support.md: -------------------------------------------------------------------------------- 1 | # Mailing Lists 2 | 3 | If you have a question about using Sisu that the existing documentation nor the forum does not answer, we'd like to hear from you on the [user mailing list or developer mailing list](mailing-lists.html). The latter should be used for questions about the internal design of Sisu. 4 | 5 | Before posting your question, please search the [mailing list archives](mailing-lists.html) in case your question has been brought up before and was already answered. 6 | 7 | # Discussion 8 | 9 | There is a [GitHub discussions](https://docs.github.com/en/discussions) forum related to Sisu at . 10 | 11 | *There is a (now deprecated) dedicated [Sisu discussion forum @ Eclipse Community Forums](https://www.eclipse.org/forums/index.php/f/232/) where questions can be asked as alternative to using the mailing lists. Please use GitHub Discussions instead now.* 12 | 13 | # Issue Tracker 14 | 15 | If you encounter a bug or have a feature request, please open a sufficiently detailed issue over in the [project's issue management](issue-management.html). We especially appreciate reports that come with suggested patches or enough information to be recreated locally. 16 | Consider also the information about [Contributing](https://github.com/eclipse-sisu/sisu-project/blob/main/CONTRIBUTING.md). -------------------------------------------------------------------------------- /src/site/resources/sisu-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eclipse-sisu/sisu-project/e86e5005ff03b57aab8c7eb7f54f41e85914e2dd/src/site/resources/sisu-black.png --------------------------------------------------------------------------------