/** * {@inheritDoc} */ @Override public boolean apply(ApiMetadata apiMetadata) { for (TypeToken<? extends View> to : apiMetadata.getViews()) if (type.isAssignableFrom(to)) return true; return false; }
/** * {@inheritDoc} */ @Override public boolean apply(ApiMetadata apiMetadata) { for (TypeToken<? extends View> to : apiMetadata.getViews()) if (type.isAssignableFrom(to)) return true; return false; }
/** * {@inheritDoc} */ @Override public boolean apply(ApiMetadata apiMetadata) { for (TypeToken<? extends View> to : apiMetadata.getViews()) if (type.isAssignableFrom(to)) return true; return false; }
/** * {@inheritDoc} */ @Override public boolean apply(ApiMetadata apiMetadata) { for (TypeToken<? extends View> to : apiMetadata.getViews()) if (TypeTokenUtils.isSupertypeOf(type, to)) return true; return false; }
/** * {@inheritDoc} */ @Override public boolean apply(ApiMetadata apiMetadata) { for (TypeToken<? extends View> to : apiMetadata.getViews()) if (TypeTokenUtils.isSupertypeOf(type, to)) return true; return false; }
/** * {@inheritDoc} */ @Override public boolean apply(ApiMetadata apiMetadata) { for (TypeToken<? extends View> to : apiMetadata.getViews()) if (TypeTokenUtils.isSupertypeOf(type, to)) return true; return false; }
public BaseProviderMetadataTest(ProviderMetadata toTest, ApiMetadata expectedApi) { this.toTest = checkNotNull(toTest, "toTest must be defined"); this.expectedApi = checkNotNull(expectedApi, "expectedApi must be defined"); this.views = expectedApi.getViews(); }
public BaseProviderMetadataTest(ProviderMetadata toTest, ApiMetadata expectedApi) { this.toTest = checkNotNull(toTest, "toTest must be defined"); this.expectedApi = checkNotNull(expectedApi, "expectedApi must be defined"); this.views = expectedApi.getViews(); }
@Override public boolean equals(Object o) { if (this == o) return true; // subclass equivalence is ok, since we don't know the classloader // we'll get things from if (o == null || !(o instanceof ApiMetadata)) return false; ApiMetadata that = ApiMetadata.class.cast(o); return equal(this.getId(), that.getId()) && equal(this.getName(), that.getName()) && equal(this.getViews(), that.getViews()); }
@Override public boolean equals(Object o) { if (this == o) return true; // subclass equivalence is ok, since we don't know the classloader // we'll get things from if (o == null || !(o instanceof ApiMetadata)) return false; ApiMetadata that = ApiMetadata.class.cast(o); return equal(this.getId(), that.getId()) && equal(this.getName(), that.getName()) && equal(this.getViews(), that.getViews()); }
@Override public boolean equals(Object o) { if (this == o) return true; // subclass equivalence is ok, since we don't know the classloader // we'll get things from if (o == null || !(o instanceof ApiMetadata)) return false; ApiMetadata that = ApiMetadata.class.cast(o); return equal(this.getId(), that.getId()) && equal(this.getName(), that.getName()) && equal(this.getViews(), that.getViews()); }
@Override public boolean equals(Object o) { if (this == o) return true; // subclass equivalence is ok, since we don't know the classloader // we'll get things from if (o == null || !(o instanceof ApiMetadata)) return false; ApiMetadata that = ApiMetadata.class.cast(o); return equal(this.getId(), that.getId()) && equal(this.getName(), that.getName()) && equal(this.getViews(), that.getViews()); }
@Override public boolean equals(Object o) { if (this == o) return true; // subclass equivalence is ok, since we don't know the classloader // we'll get things from if (o == null || !(o instanceof ApiMetadata)) return false; ApiMetadata that = ApiMetadata.class.cast(o); return equal(this.getId(), that.getId()) && equal(this.getName(), that.getName()) && equal(this.getViews(), that.getViews()); }
@Override public boolean equals(Object o) { if (this == o) return true; // subclass equivalence is ok, since we don't know the classloader // we'll get things from if (o == null || !(o instanceof ApiMetadata)) return false; ApiMetadata that = ApiMetadata.class.cast(o); return equal(this.getId(), that.getId()) && equal(this.getName(), that.getName()) && equal(this.getViews(), that.getViews()); }
public T fromApiMetadata(ApiMetadata in) { return id(in.getId()).views(in.getViews()).name(in.getName()).endpointName(in.getEndpointName()).identityName( in.getIdentityName()).credentialName(in.getCredentialName().orNull()).version(in.getVersion()) .buildVersion(in.getBuildVersion().orNull()).defaultEndpoint(in.getDefaultEndpoint().orNull()) .defaultIdentity(in.getDefaultIdentity().orNull()).defaultCredential( in.getDefaultCredential().orNull()).defaultProperties(in.getDefaultProperties()) .documentation(in.getDocumentation()).context(in.getContext()).defaultModules(in.getDefaultModules()); } }
public T fromApiMetadata(ApiMetadata in) { return id(in.getId()).views(in.getViews()).name(in.getName()).endpointName(in.getEndpointName()).identityName( in.getIdentityName()).credentialName(in.getCredentialName().orNull()).version(in.getVersion()) .buildVersion(in.getBuildVersion().orNull()).defaultEndpoint(in.getDefaultEndpoint().orNull()) .defaultIdentity(in.getDefaultIdentity().orNull()).defaultCredential( in.getDefaultCredential().orNull()).defaultProperties(in.getDefaultProperties()) .documentation(in.getDocumentation()).context(in.getContext()).defaultModules(in.getDefaultModules()); } }
public T fromApiMetadata(ApiMetadata in) { return id(in.getId()).views(in.getViews()).name(in.getName()).endpointName(in.getEndpointName()).identityName( in.getIdentityName()).credentialName(in.getCredentialName().orNull()).version(in.getVersion()) .buildVersion(in.getBuildVersion().orNull()).defaultEndpoint(in.getDefaultEndpoint().orNull()) .defaultIdentity(in.getDefaultIdentity().orNull()).defaultCredential( in.getDefaultCredential().orNull()).defaultProperties(in.getDefaultProperties()) .documentation(in.getDocumentation()).context(in.getContext()).defaultModules(in.getDefaultModules()); } }
public T fromApiMetadata(ApiMetadata in) { return id(in.getId()).views(in.getViews()).name(in.getName()).endpointName(in.getEndpointName()).identityName( in.getIdentityName()).credentialName(in.getCredentialName().orNull()).version(in.getVersion()) .buildVersion(in.getBuildVersion().orNull()).defaultEndpoint(in.getDefaultEndpoint().orNull()) .defaultIdentity(in.getDefaultIdentity().orNull()).defaultCredential( in.getDefaultCredential().orNull()).defaultProperties(in.getDefaultProperties()) .documentation(in.getDocumentation()).context(in.getContext()).defaultModules(in.getDefaultModules()); } }
public T fromApiMetadata(ApiMetadata in) { return id(in.getId()).views(in.getViews()).name(in.getName()).endpointName(in.getEndpointName()).identityName( in.getIdentityName()).credentialName(in.getCredentialName().orNull()).version(in.getVersion()) .buildVersion(in.getBuildVersion().orNull()).defaultEndpoint(in.getDefaultEndpoint().orNull()) .defaultIdentity(in.getDefaultIdentity().orNull()).defaultCredential( in.getDefaultCredential().orNull()).defaultProperties(in.getDefaultProperties()) .documentation(in.getDocumentation()).context(in.getContext()).defaultModules(in.getDefaultModules()); } }
public T fromApiMetadata(ApiMetadata in) { return id(in.getId()).views(in.getViews()).name(in.getName()).endpointName(in.getEndpointName()).identityName( in.getIdentityName()).credentialName(in.getCredentialName().orNull()).version(in.getVersion()) .buildVersion(in.getBuildVersion().orNull()).defaultEndpoint(in.getDefaultEndpoint().orNull()) .defaultIdentity(in.getDefaultIdentity().orNull()).defaultCredential( in.getDefaultCredential().orNull()).defaultProperties(in.getDefaultProperties()) .documentation(in.getDocumentation()).context(in.getContext()).defaultModules(in.getDefaultModules()); } }