Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for lookupOptional (0.09 sec)

  1. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/ProtoLookup.java

            return lookup(type);
        }
    
        @Override
        public <T> Optional<T> lookupOptional(Class<T> type) {
            return Optional.ofNullable(type.cast(components.get(type)));
        }
    
        @Override
        public <T> Optional<T> lookupOptional(Class<T> type, String name) {
            return lookupOptional(type);
        }
    
        @Override
        public <T> List<T> lookupList(Class<T> type) {
            return List.of();
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  2. compat/maven-compat/src/test/java/org/apache/maven/SimpleLookup.java

        }
    
        @Override
        public <T> T lookup(Class<T> type, String name) {
            return null;
        }
    
        @Override
        public <T> Optional<T> lookupOptional(Class<T> type) {
            return Optional.empty();
        }
    
        @Override
        public <T> Optional<T> lookupOptional(Class<T> type, String name) {
            return Optional.empty();
        }
    
        @Override
        public <T> List<T> lookupList(Class<T> type) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2K bytes
    - Viewed (0)
  3. impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultLookup.java

            try {
                return container.lookup(type, name);
            } catch (ComponentLookupException e) {
                throw new LookupException(e);
            }
        }
    
        @Override
        public <T> Optional<T> lookupOptional(Class<T> type) {
            try {
                return Optional.of(container.lookup(type));
            } catch (ComponentLookupException e) {
                if (e.getCause() instanceof NoSuchElementException) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  4. api/maven-api-cli/src/main/java/org/apache/maven/api/cli/ParserRequest.java

                    throw new LookupException("empty lookup");
                }
    
                @Override
                public <T> Optional<T> lookupOptional(Class<T> type) {
                    return Optional.empty();
                }
    
                @Override
                public <T> Optional<T> lookupOptional(Class<T> type, String name) {
                    return Optional.empty();
                }
    
                @Override
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 04 12:23:10 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  5. impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/ProtoSession.java

                    public <T> Optional<T> lookupOptional(Class<T> type) {
                        try {
                            return Optional.of(injector.getInstance(type));
                        } catch (DIException e) {
                            return Optional.empty();
                        }
                    }
    
                    @Override
                    public <T> Optional<T> lookupOptional(Class<T> type, String name) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 15.4K bytes
    - Viewed (0)
  6. impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultPackagingRegistry.java

            // which are bound to a project's classloader, without any clear definition
            // of a "project scope"
            LifecycleMapping lifecycleMapping =
                    lookup.lookupOptional(LifecycleMapping.class, id).orElse(null);
            if (lifecycleMapping == null) {
                return Optional.empty();
            }
            Type type = typeRegistry.lookup(id).orElse(null);
            if (type == null) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  7. impl/maven-core/src/main/java/org/apache/maven/DefaultMaven.java

                    return result;
                }
    
                validateOptionalProfiles(session, request.getProfileActivation());
    
                LifecycleStarter lifecycleStarter = lookup.lookupOptional(LifecycleStarter.class, request.getBuilderId())
                        .orElseGet(() -> lookup.lookup(LifecycleStarter.class));
    
                lifecycleStarter.execute(session);
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 27.5K bytes
    - Viewed (1)
Back to top