org.springframework.util.Assert.isInstanceOf()

Here are the examples of the java api org.springframework.util.Assert.isInstanceOf() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

174 Examples 7

19 Source : AbstractApplicationContextRunner.java
with Apache License 2.0
from yuanmabiji

private void configureContext(C context) {
    if (this.parent != null) {
        context.setParent(this.parent);
    }
    if (this.clreplacedLoader != null) {
        replacedert.isInstanceOf(DefaultResourceLoader.clreplaced, context);
        ((DefaultResourceLoader) context).setClreplacedLoader(this.clreplacedLoader);
    }
    this.environmentProperties.applyTo(context);
    Clreplaced<?>[] clreplacedes = Configurations.getClreplacedes(this.configurations);
    if (clreplacedes.length > 0) {
        ((AnnotationConfigRegistry) context).register(clreplacedes);
    }
    this.initializers.forEach((initializer) -> initializer.initialize(context));
    context.refresh();
}

19 Source : AssertProviderApplicationContextInvocationHandler.java
with Apache License 2.0
from yuanmabiji

private Object getSourceContext(Object[] args) {
    ApplicationContext context = getStartedApplicationContext();
    if (!ObjectUtils.isEmpty(args)) {
        replacedert.isInstanceOf((Clreplaced<?>) args[0], context);
    }
    return context;
}

19 Source : NoSuchBeanDefinitionFailureAnalyzer.java
with Apache License 2.0
from yuanmabiji

@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    replacedert.isInstanceOf(ConfigurableListableBeanFactory.clreplaced, beanFactory);
    this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
    this.metadataReaderFactory = new CachingMetadataReaderFactory(this.beanFactory.getBeanClreplacedLoader());
    // Get early as won't be accessible once context has failed to start
    this.report = ConditionEvaluationReport.get(this.beanFactory);
}

19 Source : DelegatingFilterProxyRegistrationBean.java
with Apache License 2.0
from yuanmabiji

private WebApplicationContext getWebApplicationContext() {
    replacedert.notNull(this.applicationContext, "ApplicationContext be injected");
    replacedert.isInstanceOf(WebApplicationContext.clreplaced, this.applicationContext);
    return (WebApplicationContext) this.applicationContext;
}

19 Source : WebServerFactoryCustomizerBeanPostProcessor.java
with Apache License 2.0
from yuanmabiji

@Override
public void setBeanFactory(BeanFactory beanFactory) {
    replacedert.isInstanceOf(ListableBeanFactory.clreplaced, beanFactory, "WebServerCustomizerBeanPostProcessor can only be used " + "with a ListableBeanFactory");
    this.beanFactory = (ListableBeanFactory) beanFactory;
}

19 Source : ErrorPageRegistrarBeanPostProcessor.java
with Apache License 2.0
from yuanmabiji

@Override
public void setBeanFactory(BeanFactory beanFactory) {
    replacedert.isInstanceOf(ListableBeanFactory.clreplaced, beanFactory, "ErrorPageRegistrarBeanPostProcessor can only be used " + "with a ListableBeanFactory");
    this.beanFactory = (ListableBeanFactory) beanFactory;
}

19 Source : NoUniqueBeanDefinitionFailureAnalyzer.java
with Apache License 2.0
from yuanmabiji

@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    replacedert.isInstanceOf(ConfigurableBeanFactory.clreplaced, beanFactory);
    this.beanFactory = (ConfigurableBeanFactory) beanFactory;
}

19 Source : ConfigurationPropertySources.java
with Apache License 2.0
from yuanmabiji

/**
 * Return a set of {@link ConfigurationPropertySource} instances that have previously
 * been {@link #attach(Environment) attached} to the {@link Environment}.
 * @param environment the source environment (must be an instance of
 * {@link ConfigurableEnvironment})
 * @return an iterable set of configuration property sources
 * @throws IllegalStateException if not configuration property sources have been
 * attached
 */
public static Iterable<ConfigurationPropertySource> get(Environment environment) {
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment);
    MutablePropertySources sources = ((ConfigurableEnvironment) environment).getPropertySources();
    ConfigurationPropertySourcesPropertySource attached = (ConfigurationPropertySourcesPropertySource) sources.get(ATTACHED_PROPERTY_SOURCE_NAME);
    if (attached == null) {
        return from(sources);
    }
    return attached.getSource();
}

19 Source : PropertySourcesPlaceholdersResolver.java
with Apache License 2.0
from yuanmabiji

private static PropertySources getSources(Environment environment) {
    replacedert.notNull(environment, "Environment must not be null");
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment, "Environment must be a ConfigurableEnvironment");
    return ((ConfigurableEnvironment) environment).getPropertySources();
}

19 Source : HttpServletBean.java
with MIT License
from Vip-Augus

/**
 * Set the {@code Environment} that this servlet runs in.
 * <p>Any environment set here overrides the {@link StandardServletEnvironment}
 * provided by default.
 * @throws IllegalArgumentException if environment is not replacedignable to
 * {@code ConfigurableEnvironment}
 */
@Override
public void setEnvironment(Environment environment) {
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment, "ConfigurableEnvironment required");
    this.environment = (ConfigurableEnvironment) environment;
}

19 Source : JettyRequestUpgradeStrategy.java
with MIT License
from Vip-Augus

private HttpServletRequest getHttpServletRequest(ServerHttpRequest request) {
    replacedert.isInstanceOf(AbstractServerHttpRequest.clreplaced, request);
    return ((AbstractServerHttpRequest) request).getNativeRequest();
}

19 Source : DefaultRenderingBuilder.java
with MIT License
from Vip-Augus

private RedirectView getRedirectView() {
    replacedert.isInstanceOf(RedirectView.clreplaced, this.view);
    return (RedirectView) this.view;
}

19 Source : SessionStatusMethodArgumentResolver.java
with MIT License
from Vip-Augus

@Nullable
@Override
public Object resolveArgumentValue(MethodParameter parameter, BindingContext bindingContext, ServerWebExchange exchange) {
    replacedert.isInstanceOf(InitBinderBindingContext.clreplaced, bindingContext);
    return ((InitBinderBindingContext) bindingContext).getSessionStatus();
}

19 Source : InMemoryWebSessionStore.java
with MIT License
from Vip-Augus

public Mono<WebSession> updateLastAccessTime(WebSession session) {
    return Mono.fromSupplier(() -> {
        replacedert.isInstanceOf(InMemoryWebSession.clreplaced, session);
        ((InMemoryWebSession) session).updateLastAccessTime(this.clock.instant());
        return session;
    });
}

19 Source : MappingJackson2XmlHttpMessageConverter.java
with MIT License
from Vip-Augus

/**
 * {@inheritDoc}
 * The {@code ObjectMapper} parameter must be a {@link XmlMapper} instance.
 */
@Override
public void setObjectMapper(ObjectMapper objectMapper) {
    replacedert.isInstanceOf(XmlMapper.clreplaced, objectMapper, "XmlMapper required");
    super.setObjectMapper(objectMapper);
}

19 Source : MappingJackson2SmileHttpMessageConverter.java
with MIT License
from Vip-Augus

/**
 * {@inheritDoc}
 * The {@code ObjectMapper} must be configured with a {@code SmileFactory} instance.
 */
@Override
public void setObjectMapper(ObjectMapper objectMapper) {
    replacedert.isInstanceOf(SmileFactory.clreplaced, objectMapper.getFactory(), "SmileFactory required");
    super.setObjectMapper(objectMapper);
}

19 Source : MappingJackson2CborHttpMessageConverter.java
with MIT License
from Vip-Augus

/**
 * {@inheritDoc}
 * The {@code ObjectMapper} must be configured with a {@code CBORFactory} instance.
 */
@Override
public void setObjectMapper(ObjectMapper objectMapper) {
    replacedert.isInstanceOf(CBORFactory.clreplaced, objectMapper.getFactory(), "CBORFactory required");
    super.setObjectMapper(objectMapper);
}

19 Source : RSocketRequesterMethodArgumentResolver.java
with MIT License
from Vip-Augus

@Override
public Mono<Object> resolveArgument(MethodParameter parameter, Message<?> message) {
    Object headerValue = message.getHeaders().get(RSOCKET_REQUESTER_HEADER);
    replacedert.notNull(headerValue, "Missing '" + RSOCKET_REQUESTER_HEADER + "'");
    replacedert.isInstanceOf(RSocketRequester.clreplaced, headerValue, "Expected header value of type RSocketRequester");
    RSocketRequester requester = (RSocketRequester) headerValue;
    Clreplaced<?> type = parameter.getParameterType();
    if (RSocketRequester.clreplaced.equals(type)) {
        return Mono.just(requester);
    } else if (RSocket.clreplaced.isreplacedignableFrom(type)) {
        return Mono.just(requester.rsocket());
    } else {
        return Mono.error(new IllegalArgumentException("Unexpected parameter type: " + parameter));
    }
}

19 Source : AttributeMethods.java
with MIT License
from Vip-Augus

private void replacedertAnnotation(Annotation annotation) {
    replacedert.notNull(annotation, "Annotation must not be null");
    if (this.annotationType != null) {
        replacedert.isInstanceOf(this.annotationType, annotation);
    }
}

19 Source : ZookeeperServiceInstanceConverter.java
with Apache License 2.0
from SpringCloud

@Override
protected URI getHealthUrl(ServiceInstance instance) {
    replacedert.isInstanceOf(ZookeeperServiceInstance.clreplaced, instance, "serviceInstance must be of type ZookeeperServiceInstance");
    String healthPath = instance.getMetadata().get(KEY_HEALTH_PATH);
    if (isEmpty(healthPath)) {
        healthPath = healthEndpointPath;
    }
    return UriComponentsBuilder.fromUri(getManagementUrl(instance)).path("/").path(healthPath).build().toUri();
}

19 Source : EurekaServiceInstanceConverter.java
with Apache License 2.0
from SpringCloud

@Override
protected URI getHealthUrl(ServiceInstance instance) {
    replacedert.isInstanceOf(EurekaServiceInstance.clreplaced, instance, "serviceInstance must be of type EurekaServiceInstance");
    InstanceInfo instanceInfo = ((EurekaServiceInstance) instance).getInstanceInfo();
    String healthUrl = instanceInfo.getSecureHealthCheckUrl();
    if (StringUtils.isEmpty(healthUrl)) {
        healthUrl = instanceInfo.getHealthCheckUrl();
    }
    return URI.create(healthUrl);
}

19 Source : ObjectToByteArrayComparator.java
with Apache License 2.0
from spring-projects

private Serializable replacedertSerializable(Object target) {
    replacedert.isInstanceOf(Serializable.clreplaced, target);
    return (Serializable) target;
}

19 Source : ReactiveFirestoreTransactionManager.java
with Apache License 2.0
from spring-cloud

private static ReactiveFirestoreTransactionObject extractFirestoreTransaction(Object transaction) {
    replacedert.isInstanceOf(ReactiveFirestoreTransactionObject.clreplaced, transaction, () -> String.format("Expected to find a %s but it turned out to be %s.", ReactiveFirestoreTransactionObject.clreplaced, transaction.getClreplaced()));
    return (ReactiveFirestoreTransactionObject) transaction;
}

19 Source : PathPatternRouteMatcher.java
with Apache License 2.0
from SourceHot

private PathContainer getPathContainer(Route route) {
    replacedert.isInstanceOf(PathContainerRoute.clreplaced, route);
    return ((PathContainerRoute) route).pathContainer;
}

19 Source : InMemoryWebSessionStore.java
with Apache License 2.0
from SourceHot

@Override
public Mono<WebSession> updateLastAccessTime(WebSession session) {
    return Mono.fromSupplier(() -> {
        replacedert.isInstanceOf(InMemoryWebSession.clreplaced, session);
        ((InMemoryWebSession) session).updateLastAccessTime(this.clock.instant());
        return session;
    });
}

19 Source : DubboConfigBindingsRegistrar.java
with Apache License 2.0
from smallFive55

@Override
public void setEnvironment(Environment environment) {
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment);
    this.environment = (ConfigurableEnvironment) environment;
}

19 Source : AnnotationInjectedBeanPostProcessor.java
with Apache License 2.0
from smallFive55

public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    replacedert.isInstanceOf(ConfigurableListableBeanFactory.clreplaced, beanFactory, "AnnotationInjectedBeanPostProcessor requires a ConfigurableListableBeanFactory");
    this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}

19 Source : DoubleDefinition.java
with MIT License
from pchudzik

public <T> T getConfiguration(Clreplaced<T> configurationClreplaced) {
    if (doubleConfiguration == null) {
        return null;
    }
    replacedert.isInstanceOf(configurationClreplaced, doubleConfiguration);
    return (T) doubleConfiguration;
}

19 Source : ReactiveNeo4jTransactionManager.java
with Apache License 2.0
from neo4j

private static ReactiveNeo4jTransactionObject extractNeo4jTransaction(Object transaction) {
    replacedert.isInstanceOf(ReactiveNeo4jTransactionObject.clreplaced, transaction, () -> String.format("Expected to find a %s but it turned out to be %s.", ReactiveNeo4jTransactionObject.clreplaced, transaction.getClreplaced()));
    return (ReactiveNeo4jTransactionObject) transaction;
}

19 Source : Neo4jTransactionManager.java
with Apache License 2.0
from neo4j

private static Neo4jTransactionObject extractNeo4jTransaction(Object transaction) {
    replacedert.isInstanceOf(Neo4jTransactionObject.clreplaced, transaction, () -> String.format("Expected to find a %s but it turned out to be %s.", Neo4jTransactionObject.clreplaced, transaction.getClreplaced()));
    return (Neo4jTransactionObject) transaction;
}

19 Source : MapDbKeyValueAdapter.java
with MIT License
from mrfrag

@SuppressWarnings("rawtypes")
public BTreeMap getMap(Serializable keyspace) {
    replacedert.isInstanceOf(String.clreplaced, keyspace, "Keyspace identifier must be of type String.");
    return mapDb.treeMap((String) keyspace).counterEnable().createOrOpen();
}

19 Source : RequestUtils.java
with Apache License 2.0
from line

/**
 * Gets current {@link HttpServletRequest request} from {@link ThreadLocal}.
 *
 * @return current {@link HttpServletRequest request}
 */
public static HttpServletRequest getCurrentHttpRequest() {
    RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
    replacedert.isInstanceOf(ServletRequestAttributes.clreplaced, requestAttributes);
    return ((ServletRequestAttributes) requestAttributes).getRequest();
}

19 Source : HttpServletResponseArgumentResolver.java
with Apache License 2.0
from line

@Override
public Object resolve(MethodParameter methodParam, CEKRequestMessage requestMessage) {
    RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
    replacedert.isInstanceOf(ServletRequestAttributes.clreplaced, requestAttributes);
    return ((ServletRequestAttributes) requestAttributes).getResponse();
}

19 Source : GenericPortletBean.java
with Apache License 2.0
from liferay

/**
 * {@inheritDoc}
 *
 * @throws  IllegalArgumentException  if environment is not replacedignable to {@code ConfigurableEnvironment}.
 */
@Override
public void setEnvironment(Environment environment) {
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment);
    this.environment = (ConfigurableEnvironment) environment;
}

19 Source : GenericPortletBean.java
with Apache License 2.0
from langtianya

/**
 * {@inheritDoc}
 * @throws IllegalArgumentException if environment is not replacedignable to
 * {@code ConfigurableEnvironment}.
 */
@Override
public void setEnvironment(Environment environment) {
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment);
    this.environment = (ConfigurableEnvironment) environment;
}

19 Source : ScriptTemplateView.java
with Apache License 2.0
from langtianya

/**
 * See {@link ScriptTemplateConfigurer#setEngine(ScriptEngine)} doreplacedentation.
 */
public void setEngine(ScriptEngine engine) {
    replacedert.isInstanceOf(Invocable.clreplaced, engine);
    this.engine = engine;
}

19 Source : DefaultLifecycleProcessor.java
with Apache License 2.0
from langtianya

@Override
public void setBeanFactory(BeanFactory beanFactory) {
    replacedert.isInstanceOf(ConfigurableListableBeanFactory.clreplaced, beanFactory);
    this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}

19 Source : ConfigurationPropertySources.java
with Apache License 2.0
from hello-shf

/**
 * Return a set of {@link ConfigurationPropertySource} instances that have previously
 * been {@link #attach(Environment) attached} to the {@link Environment}.
 *
 * @param environment the source environment (must be an instance of
 *                    {@link ConfigurableEnvironment})
 * @return an iterable set of configuration property sources
 * @throws IllegalStateException if not configuration property sources have been
 *                               attached
 */
public static Iterable<ConfigurationPropertySource> get(Environment environment) {
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment);
    MutablePropertySources sources = ((ConfigurableEnvironment) environment).getPropertySources();
    ConfigurationPropertySourcesPropertySource attached = (ConfigurationPropertySourcesPropertySource) sources.get(ATTACHED_PROPERTY_SOURCE_NAME);
    if (attached == null) {
        return from(sources);
    }
    return attached.getSource();
}

19 Source : CompositeWxMappingInfo.java
with Apache License 2.0
from FastBootWeixin

@Override
public WxRequestCondition combine(WxRequestCondition other) {
    replacedert.isInstanceOf(CompositeWxMappingInfo.clreplaced, other, "不支持的合并操作");
    CompositeWxMappingInfo otherInfo = (CompositeWxMappingInfo) other;
    WxMappingInfo wxButtonInfo = this.wxButtonInfo.combine(otherInfo.wxButtonInfo);
    WxMappingInfo wxButtonMappingInfo = this.wxButtonMappingInfo.combine(otherInfo.wxButtonMappingInfo);
    WxMappingInfo wxMessageMappingInfo = this.wxMessageMappingInfo.combine(otherInfo.wxMessageMappingInfo);
    WxMappingInfo wxEventMappingInfo = this.wxEventMappingInfo.combine(otherInfo.wxEventMappingInfo);
    return new CompositeWxMappingInfo(wxButtonInfo, wxButtonMappingInfo, wxMessageMappingInfo, wxEventMappingInfo);
}

19 Source : MarsValueBeanDefinitionRegistrar.java
with Apache License 2.0
from fashionbrot

@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    replacedert.isInstanceOf(ConfigurableListableBeanFactory.clreplaced, beanFactory, "MarsValueBeanDefinitionRegistrar requires a ConfigurableListableBeanFactory");
    this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}

19 Source : MarsConfigBeanDefinitionRegistrar.java
with Apache License 2.0
from fashionbrot

@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    replacedert.isInstanceOf(ConfigurableListableBeanFactory.clreplaced, beanFactory, "MarsConfigBeanDefinitionRegistrar requires a ConfigurableListableBeanFactory");
    this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}

19 Source : LookupStrategyImpl.java
with MIT License
from epam

/**
 * Looks up a batch of <code>ObjectIdenreplacedy</code>s directly from the database.
 * <p>
 * The caller is responsible for optimization issues, such as selecting the idenreplacedies
 * to lookup, ensuring the cache doesn't contain them already, and adding the returned
 * elements to the cache etc.
 * <p>
 * This subclreplaced is required to return fully valid <code>Acl</code>s, including
 * properly-configured parent ACLs.
 */
Map<ObjectIdenreplacedy, Acl> lookupObjectIdenreplacedies(final Collection<ObjectIdenreplacedy> objectIdenreplacedies, List<Sid> sids) {
    replacedert.notEmpty(objectIdenreplacedies, "Must provide idenreplacedies to lookup");
    // contains
    final Map<Serializable, Acl> acls = new HashMap<Serializable, Acl>();
    // Acls
    // with
    // StubAclParents
    // Make the "acls" map contain all requested objectIdenreplacedies
    // (including markers to each parent in the hierarchy)
    String sql = computeRepeatingSql(lookupObjectIdenreplacediesWhereClause, objectIdenreplacedies.size());
    Set<Long> parentsToLookup = jdbcTemplate.query(sql, new PreparedStatementSetter() {

        public void setValues(PreparedStatement ps) throws SQLException {
            int i = 0;
            for (ObjectIdenreplacedy oid : objectIdenreplacedies) {
                // Determine prepared statement values for this iteration
                String type = oid.getType();
                // No need to check for nulls, as guaranteed non-null by
                // ObjectIdenreplacedy.getIdentifier() interface contract
                String identifier = oid.getIdentifier().toString();
                long id = (Long.valueOf(identifier)).longValue();
                // Inject values
                ps.setLong((2 * i) + 1, id);
                ps.setString((2 * i) + 2, type);
                i++;
            }
        }
    }, new LookupStrategyImpl.ProcessResultSet(acls, sids));
    // Lookup the parents, now that our JdbcTemplate has released the database
    // connection (SEC-547)
    if (parentsToLookup.size() > 0) {
        lookupPrimaryKeys(acls, parentsToLookup, sids);
    }
    // Finally, convert our "acls" containing StubAclParents into true Acls
    Map<ObjectIdenreplacedy, Acl> resultMap = new HashMap<ObjectIdenreplacedy, Acl>();
    for (Acl inputAcl : acls.values()) {
        replacedert.isInstanceOf(AclImpl.clreplaced, inputAcl, "Map should have contained an AclImpl");
        replacedert.isInstanceOf(Long.clreplaced, ((AclImpl) inputAcl).getId(), "Acl.getId() must be Long");
        Acl result = convert(acls, (Long) ((AclImpl) inputAcl).getId());
        resultMap.put(result.getObjectIdenreplacedy(), result);
    }
    return resultMap;
}

19 Source : LookupStrategyImpl.java
with MIT License
from epam

/**
 * The final phase of converting the <code>Map</code> of <code>AclImpl</code>
 * instances which contain <code>StubAclParent</code>s into proper, valid
 * <code>AclImpl</code>s with correct ACL parents.
 *
 * @param inputMap the unconverted <code>AclImpl</code>s
 * @param currentIdenreplacedy the current<code>Acl</code> that we wish to convert (this
 * may be
 */
private AclImpl convert(Map<Serializable, Acl> inputMap, Long currentIdenreplacedy) {
    replacedert.notEmpty(inputMap, "InputMap required");
    replacedert.notNull(currentIdenreplacedy, "CurrentIdenreplacedy required");
    // Retrieve this Acl from the InputMap
    Acl uncastAcl = inputMap.get(currentIdenreplacedy);
    replacedert.isInstanceOf(AclImpl.clreplaced, uncastAcl, "The inputMap contained a non-AclImpl");
    AclImpl inputAcl = (AclImpl) uncastAcl;
    Acl parent = inputAcl.getParentAcl();
    if ((parent != null) && parent instanceof LookupStrategyImpl.StubAclParent) {
        // Lookup the parent
        LookupStrategyImpl.StubAclParent stubAclParent = (LookupStrategyImpl.StubAclParent) parent;
        parent = convert(inputMap, stubAclParent.getId());
    }
    // Now we have the parent (if there is one), create the true AclImpl
    AclImpl result = new AclImpl(inputAcl.getObjectIdenreplacedy(), (Long) inputAcl.getId(), aclAuthorizationStrategy, grantingStrategy, parent, null, inputAcl.isEntriesInheriting(), inputAcl.getOwner());
    // Copy the "aces" from the input to the destination
    // Obtain the "aces" from the input ACL
    List<AccessControlEntryImpl> aces = readAces(inputAcl);
    // Create a list in which to store the "aces" for the "result" AclImpl instance
    List<AccessControlEntryImpl> acesNew = new ArrayList<AccessControlEntryImpl>();
    // Iterate over the "aces" input and replace each nested
    // AccessControlEntryImpl.getAcl() with the new "result" AclImpl instance
    // This ensures StubAclParent instances are removed, as per SEC-951
    for (AccessControlEntryImpl ace : aces) {
        setAclOnAce(ace, result);
        acesNew.add(ace);
    }
    // Finally, now that the "aces" have been converted to have the "result" AclImpl
    // instance, modify the "result" AclImpl instance
    setAces(result, acesNew);
    return result;
}

19 Source : SingleExportDependingOnMultipleImportTest.java
with Apache License 2.0
from eclipse

private void checkAndTakeDownService(String beanName, Clreplaced<?> type, String bundleSymName) throws Exception {
    ServiceReference ref = bundleContext.getServiceReference(type.getName());
    Object service = bundleContext.getService(ref);
    replacedert.isInstanceOf(type, service);
    Bundle dependency = OsgiBundleUtils.findBundleBySymbolicName(bundleContext, bundleSymName);
    // stop dependency bundle -> no importer -> exporter goes down
    dependency.stop();
}

19 Source : DefaultMandatoryDependencyManager.java
with Apache License 2.0
from eclipse

public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
    replacedert.isInstanceOf(ConfigurableListableBeanFactory.clreplaced, beanFactory);
    this.beanFactory = (ConfigurableListableBeanFactory) beanFactory;
}

19 Source : GenericSchema.java
with Apache License 2.0
from apache

@PostMapping(path = "genericMapList")
public Generic<Map<String, List<String>>> genericMapList(@RequestBody Generic<Map<String, List<String>>> mapListGeneric) {
    replacedert.isInstanceOf(Generic.clreplaced, mapListGeneric);
    replacedert.isInstanceOf(Map.clreplaced, mapListGeneric.value);
    return mapListGeneric;
}

19 Source : GenericSchema.java
with Apache License 2.0
from apache

@PostMapping(path = "genericDate")
public Generic<Date> genericDate(@RequestBody Generic<Date> input) {
    replacedert.isInstanceOf(Generic.clreplaced, input);
    replacedert.isInstanceOf(Date.clreplaced, input.value);
    return input;
}

19 Source : WrapperUtils.java
with Apache License 2.0
from alibaba

/**
 * Unwrap {@link BeanFactory} to {@link ConfigurableListableBeanFactory}
 *
 * @param beanFactory {@link ConfigurableListableBeanFactory}
 * @return {@link ConfigurableListableBeanFactory}
 * @throws IllegalArgumentException If <code>beanFactory</code> argument is not an instance of {@link ConfigurableListableBeanFactory}
 */
public static ConfigurableListableBeanFactory unwrap(BeanFactory beanFactory) throws IllegalArgumentException {
    replacedert.isInstanceOf(ConfigurableListableBeanFactory.clreplaced, beanFactory, "The 'beanFactory' argument is not an instance of ConfigurableListableBeanFactory, " + "is it running in Spring container?");
    return ConfigurableListableBeanFactory.clreplaced.cast(beanFactory);
}

19 Source : WrapperUtils.java
with Apache License 2.0
from alibaba

/**
 * Unwrap {@link Environment} to {@link ConfigurableEnvironment}
 *
 * @param environment {@link Environment}
 * @return {@link ConfigurableEnvironment}
 * @throws IllegalArgumentException If <code>environment</code> argument is not an instance of {@link ConfigurableEnvironment}
 */
public static ConfigurableEnvironment unwrap(Environment environment) throws IllegalArgumentException {
    replacedert.isInstanceOf(ConfigurableEnvironment.clreplaced, environment, "The 'environment' argument is not a instance of ConfigurableEnvironment, " + "is it running in Spring container?");
    return (ConfigurableEnvironment) environment;
}

18 Source : TestEntityManager.java
with Apache License 2.0
from yuanmabiji

/**
 * Return the ID of the given enreplacedy cast to a specific type. Delegates to
 * {@link PersistenceUnitUtil#getIdentifier(Object)}.
 * @param <T> the ID type
 * @param enreplacedy the source enreplacedy
 * @param idType the expected ID type
 * @return the ID of the enreplacedy or {@code null}
 * @see #getId(Object)
 */
@SuppressWarnings("unchecked")
public <T> T getId(Object enreplacedy, Clreplaced<T> idType) {
    Object id = getId(enreplacedy);
    replacedert.isInstanceOf(idType, id, "ID mismatch:");
    return (T) id;
}

See More Examples