Add more spring stubs

This commit is contained in:
Joe Farebrother
2021-04-07 14:57:32 +01:00
parent c1555b36a1
commit 4be7e94dcc
4 changed files with 853 additions and 90 deletions

View File

@@ -1,40 +1,63 @@
/*
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.http;
import org.springframework.lang.Nullable;
import org.springframework.util.MultiValueMap;
public class HttpEntity<T> {
public static final HttpEntity<?> EMPTY = null;
protected HttpEntity() {
}
protected HttpEntity() {
}
public HttpEntity(T body) {
}
public HttpEntity(T body) {
}
public HttpEntity(org.springframework.util.MultiValueMap<java.lang.String, java.lang.String> headers) {
}
public HttpEntity(MultiValueMap<String, String> headers) {
}
public HttpEntity(T body, org.springframework.util.MultiValueMap<java.lang.String, java.lang.String> headers) {
}
public HttpEntity(@Nullable T body, @Nullable MultiValueMap<String, String> headers) {
}
public org.springframework.http.HttpHeaders getHeaders() {
return null;
}
public HttpHeaders getHeaders() {
return null;
}
public T getBody() {
return null;
}
public T getBody() {
return null;
}
public boolean hasBody() {
return false;
}
public boolean hasBody() {
return false;
}
public boolean equals(java.lang.Object other) {
return false;
}
@Override
public boolean equals(@Nullable Object other) {
return false;
}
public int hashCode() {
return 0;
}
@Override
public int hashCode() {
return 0;
}
public java.lang.String toString() {
return null;
}
}
@Override
public String toString() {
return null;
}
}

View File

@@ -1,4 +1,492 @@
package org.springframework.http;
/*
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
public class HttpHeaders implements java.io.Serializable {
}
package org.springframework.http;
import java.io.Serializable;
import java.net.InetSocketAddress;
import java.net.URI;
import java.nio.charset.Charset;
import java.time.Duration;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import org.springframework.lang.Nullable;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
public class HttpHeaders implements MultiValueMap<String, String>, Serializable {
public static final HttpHeaders EMPTY = null;
public HttpHeaders() {
}
public HttpHeaders(MultiValueMap<String, String> headers) {
}
public List<String> getOrEmpty(Object headerName) {
return null;
}
public void setAccept(List<MediaType> acceptableMediaTypes) {
}
public List<MediaType> getAccept() {
return null;
}
public void setAcceptLanguage(List<Locale.LanguageRange> languages) {
}
public List<Locale.LanguageRange> getAcceptLanguage() {
return null;
}
public void setAcceptLanguageAsLocales(List<Locale> locales) {
}
public List<Locale> getAcceptLanguageAsLocales() {
return null;
}
public void setAccessControlAllowCredentials(boolean allowCredentials) {
}
public boolean getAccessControlAllowCredentials() {
return false;
}
public void setAccessControlAllowHeaders(List<String> allowedHeaders) {
}
public List<String> getAccessControlAllowHeaders() {
return null;
}
public void setAccessControlAllowMethods(List<HttpMethod> allowedMethods) {
}
public List<HttpMethod> getAccessControlAllowMethods() {
return null;
}
public void setAccessControlAllowOrigin(@Nullable String allowedOrigin) {
}
public String getAccessControlAllowOrigin() {
return null;
}
public void setAccessControlExposeHeaders(List<String> exposedHeaders) {
}
public List<String> getAccessControlExposeHeaders() {
return null;
}
public void setAccessControlMaxAge(Duration maxAge) {
}
public void setAccessControlMaxAge(long maxAge) {
}
public long getAccessControlMaxAge() {
return 0;
}
public void setAccessControlRequestHeaders(List<String> requestHeaders) {
}
public List<String> getAccessControlRequestHeaders() {
return null;
}
public void setAccessControlRequestMethod(@Nullable HttpMethod requestMethod) {
}
public HttpMethod getAccessControlRequestMethod() {
return null;
}
public void setAcceptCharset(List<Charset> acceptableCharsets) {
}
public List<Charset> getAcceptCharset() {
return null;
}
public void setAllow(Set<HttpMethod> allowedMethods) {
}
public Set<HttpMethod> getAllow() {
return null;
}
public void setBasicAuth(String username, String password) {
}
public void setBasicAuth(String username, String password, @Nullable Charset charset) {
}
public void setBasicAuth(String encodedCredentials) {
}
public void setBearerAuth(String token) {
}
public void setCacheControl(CacheControl cacheControl) {
}
public void setCacheControl(@Nullable String cacheControl) {
}
public String getCacheControl() {
return null;
}
public void setConnection(String connection) {
}
public void setConnection(List<String> connection) {
}
public List<String> getConnection() {
return null;
}
public void setContentDispositionFormData(String name, @Nullable String filename) {
}
public void setContentDisposition(ContentDisposition contentDisposition) {
}
public ContentDisposition getContentDisposition() {
return null;
}
public void setContentLanguage(@Nullable Locale locale) {
}
public Locale getContentLanguage() {
return null;
}
public void setContentLength(long contentLength) {
}
public long getContentLength() {
return 0;
}
public void setContentType(@Nullable MediaType mediaType) {
}
public MediaType getContentType() {
return null;
}
public void setDate(ZonedDateTime date) {
}
public void setDate(Instant date) {
}
public void setDate(long date) {
}
public long getDate() {
return 0;
}
public void setETag(@Nullable String etag) {
}
public String getETag() {
return null;
}
public void setExpires(ZonedDateTime expires) {
}
public void setExpires(Instant expires) {
}
public void setExpires(long expires) {
}
public long getExpires() {
return 0;
}
public void setHost(@Nullable InetSocketAddress host) {
}
public InetSocketAddress getHost() {
return null;
}
public void setIfMatch(String ifMatch) {
}
public void setIfMatch(List<String> ifMatchList) {
}
public List<String> getIfMatch() {
return null;
}
public void setIfModifiedSince(ZonedDateTime ifModifiedSince) {
}
public void setIfModifiedSince(Instant ifModifiedSince) {
}
public void setIfModifiedSince(long ifModifiedSince) {
}
public long getIfModifiedSince() {
return 0;
}
public void setIfNoneMatch(String ifNoneMatch) {
}
public void setIfNoneMatch(List<String> ifNoneMatchList) {
}
public List<String> getIfNoneMatch() {
return null;
}
public void setIfUnmodifiedSince(ZonedDateTime ifUnmodifiedSince) {
}
public void setIfUnmodifiedSince(Instant ifUnmodifiedSince) {
}
public void setIfUnmodifiedSince(long ifUnmodifiedSince) {
}
public long getIfUnmodifiedSince() {
return 0;
}
public void setLastModified(ZonedDateTime lastModified) {
}
public void setLastModified(Instant lastModified) {
}
public void setLastModified(long lastModified) {
}
public long getLastModified() {
return 0;
}
public void setLocation(@Nullable URI location) {
}
public URI getLocation() {
return null;
}
public void setOrigin(@Nullable String origin) {
}
public String getOrigin() {
return null;
}
public void setPragma(@Nullable String pragma) {
}
public String getPragma() {
return null;
}
public void setRange(List<HttpRange> ranges) {
}
public List<HttpRange> getRange() {
return null;
}
public void setUpgrade(@Nullable String upgrade) {
}
public String getUpgrade() {
return null;
}
public void setVary(List<String> requestHeaders) {
}
public List<String> getVary() {
return null;
}
public void setZonedDateTime(String headerName, ZonedDateTime date) {
}
public void setInstant(String headerName, Instant date) {
}
public void setDate(String headerName, long date) {
}
public long getFirstDate(String headerName) {
return 0;
}
public ZonedDateTime getFirstZonedDateTime(String headerName) {
return null;
}
public List<String> getValuesAsList(String headerName) {
return null;
}
public void clearContentHeaders() {
}
@Override
public String getFirst(String headerName) {
return null;
}
@Override
public void add(String headerName, @Nullable String headerValue) {
}
@Override
public void addAll(String key, List<? extends String> values) {
}
@Override
public void addAll(MultiValueMap<String, String> values) {
}
@Override
public void set(String headerName, @Nullable String headerValue) {
}
@Override
public void setAll(Map<String, String> values) {
}
@Override
public Map<String, String> toSingleValueMap() {
return null;
}
@Override
public int size() {
return 0;
}
@Override
public boolean isEmpty() {
return false;
}
@Override
public boolean containsKey(Object key) {
return false;
}
@Override
public boolean containsValue(Object value) {
return false;
}
@Override
public List<String> get(Object key) {
return null;
}
@Override
public List<String> put(String key, List<String> value) {
return null;
}
@Override
public List<String> remove(Object key) {
return null;
}
@Override
public void putAll(Map<? extends String, ? extends List<String>> map) {
}
@Override
public void clear() {
}
@Override
public Set<String> keySet() {
return null;
}
@Override
public Collection<List<String>> values() {
return null;
}
@Override
public Set<Entry<String, List<String>>> entrySet() {
return null;
}
@Override
public boolean equals(@Nullable Object other) {
return false;
}
@Override
public int hashCode() {
return 0;
}
@Override
public String toString() {
return null;
}
public static HttpHeaders readOnlyHttpHeaders(MultiValueMap<String, String> headers) {
return null;
}
public static HttpHeaders readOnlyHttpHeaders(HttpHeaders headers) {
return null;
}
public static HttpHeaders writableHttpHeaders(HttpHeaders headers) {
return null;
}
public static String formatHeaders(MultiValueMap<String, String> headers) {
return null;
}
public static String encodeBasicAuth(String username, String password, @Nullable Charset charset) {
return null;
}
}

View File

@@ -1,70 +1,195 @@
/*
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.http;
import java.lang.reflect.Type;
import java.net.URI;
import java.nio.charset.Charset;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.util.Map;
import java.util.function.Consumer;
import org.springframework.lang.Nullable;
import org.springframework.util.MultiValueMap;
public class RequestEntity<T> extends org.springframework.http.HttpEntity {
public class RequestEntity<T> extends HttpEntity<T> {
public RequestEntity(HttpMethod method, URI url) {
}
public RequestEntity(org.springframework.http.HttpMethod method, java.net.URI url) {
}
public RequestEntity(@Nullable T body, HttpMethod method, URI url) {
}
public RequestEntity(T body, org.springframework.http.HttpMethod method, java.net.URI url) {
}
public RequestEntity(@Nullable T body, HttpMethod method, URI url, Type type) {
}
public RequestEntity(T body, org.springframework.http.HttpMethod method, java.net.URI url,
java.lang.reflect.Type type) {
}
public RequestEntity(MultiValueMap<String, String> headers, HttpMethod method, URI url) {
}
public RequestEntity(org.springframework.util.MultiValueMap<java.lang.String, java.lang.String> headers,
org.springframework.http.HttpMethod method, java.net.URI url) {
}
public RequestEntity(@Nullable T body, @Nullable MultiValueMap<String, String> headers,
@Nullable HttpMethod method, URI url) {
}
public RequestEntity(T body, org.springframework.util.MultiValueMap<java.lang.String, java.lang.String> headers,
org.springframework.http.HttpMethod method, java.net.URI url) {
}
public RequestEntity(@Nullable T body, @Nullable MultiValueMap<String, String> headers,
@Nullable HttpMethod method, @Nullable URI url, @Nullable Type type) {
}
public RequestEntity(T body, org.springframework.util.MultiValueMap<java.lang.String, java.lang.String> headers,
org.springframework.http.HttpMethod method, java.net.URI url, java.lang.reflect.Type type) {
}
public HttpMethod getMethod() {
return null;
}
public java.net.URI getUrl() {
return null;
}
public URI getUrl() {
return null;
}
public static org.springframework.http.RequestEntity.BodyBuilder method(org.springframework.http.HttpMethod method,
java.net.URI url) {
return null;
}
public Type getType() {
return null;
}
public static org.springframework.http.RequestEntity.HeadersBuilder get(java.net.URI url) {
return null;
}
@Override
public boolean equals(@Nullable Object other) {
return false;
}
public static org.springframework.http.RequestEntity.HeadersBuilder head(java.net.URI url) {
return null;
}
@Override
public int hashCode() {
return 0;
}
public static org.springframework.http.RequestEntity.BodyBuilder post(java.net.URI url) {
return null;
}
@Override
public String toString() {
return null;
}
public static org.springframework.http.RequestEntity.BodyBuilder put(java.net.URI url) {
return null;
}
public static BodyBuilder method(HttpMethod method, URI url) {
return null;
}
public static org.springframework.http.RequestEntity.BodyBuilder patch(java.net.URI url) {
return null;
}
public static BodyBuilder method(HttpMethod method, String uriTemplate, Object... uriVariables) {
return null;
}
public static org.springframework.http.RequestEntity.HeadersBuilder delete(java.net.URI url) {
return null;
}
public static BodyBuilder method(HttpMethod method, String uriTemplate, Map<String, ?> uriVariables) {
return null;
}
public static org.springframework.http.RequestEntity.HeadersBuilder options(java.net.URI url) {
return null;
}
public static HeadersBuilder<?> get(URI url) {
return null;
}
class HeadersBuilder<K> {
}
public static HeadersBuilder<?> get(String uriTemplate, Object... uriVariables) {
return null;
}
public class BodyBuilder<T> {
public RequestEntity<T> body(Object body){return null;};
}
public static HeadersBuilder<?> head(URI url) {
return null;
}
public static HeadersBuilder<?> head(String uriTemplate, Object... uriVariables) {
return null;
}
public static BodyBuilder post(URI url) {
return null;
}
public static BodyBuilder post(String uriTemplate, Object... uriVariables) {
return null;
}
public static BodyBuilder put(URI url) {
return null;
}
public static BodyBuilder put(String uriTemplate, Object... uriVariables) {
return null;
}
public static BodyBuilder patch(URI url) {
return null;
}
public static BodyBuilder patch(String uriTemplate, Object... uriVariables) {
return null;
}
public static HeadersBuilder<?> delete(URI url) {
return null;
}
public static HeadersBuilder<?> delete(String uriTemplate, Object... uriVariables) {
return null;
}
public static HeadersBuilder<?> options(URI url) {
return null;
}
public static HeadersBuilder<?> options(String uriTemplate, Object... uriVariables) {
return null;
}
public interface HeadersBuilder<B extends HeadersBuilder<B>> {
B header(String headerName, String... headerValues);
B headers(@Nullable HttpHeaders headers);
B headers(Consumer<HttpHeaders> headersConsumer);
B accept(MediaType... acceptableMediaTypes);
B acceptCharset(Charset... acceptableCharsets);
B ifModifiedSince(ZonedDateTime ifModifiedSince);
B ifModifiedSince(Instant ifModifiedSince);
B ifModifiedSince(long ifModifiedSince);
B ifNoneMatch(String... ifNoneMatches);
RequestEntity<Void> build();
}
public interface BodyBuilder extends HeadersBuilder<BodyBuilder> {
BodyBuilder contentLength(long contentLength);
BodyBuilder contentType(MediaType contentType);
<T> RequestEntity<T> body(T body);
<T> RequestEntity<T> body(T body, Type type);
}
// public static class UriTemplateRequestEntity<T> extends RequestEntity<T> {
// public String getUriTemplate() {
// return null;
// }
// public Object[] getVars() {
// return null;
// }
// public Map<String, ?> getVarsMap() {
// return null;
// }
// @Override
// public String toString() {
// return null;
// }
// }
}

View File

@@ -1,16 +1,143 @@
/*
* Copyright 2002-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.http;
import java.net.URI;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.util.Optional;
import java.util.function.Consumer;
import org.springframework.lang.Nullable;
import org.springframework.util.MultiValueMap;
public class ResponseEntity<T> extends org.springframework.http.HttpEntity {
public class ResponseEntity<T> extends HttpEntity<T> {
public ResponseEntity(HttpStatus status) {
}
// private final java.lang.Object status;
public ResponseEntity(@Nullable T body, HttpStatus status) {
}
// public ResponseEntity(org.springframework.http.HttpStatus status) {
// }
public ResponseEntity(MultiValueMap<String, String> headers, HttpStatus status) {
}
// public ResponseEntity(T body, org.springframework.http.HttpStatus status) {
// }
public ResponseEntity(@Nullable T body, @Nullable MultiValueMap<String, String> headers, HttpStatus status) {
}
public static <T> ResponseEntity<T> ok(T body) {
return null;
}
}
public ResponseEntity(@Nullable T body, @Nullable MultiValueMap<String, String> headers, int rawStatus) {
}
public HttpStatus getStatusCode() {
return null;
}
public int getStatusCodeValue() {
return 0;
}
@Override
public boolean equals(@Nullable Object other) {
return false;
}
@Override
public int hashCode() {
return 0;
}
@Override
public String toString() {
return null;
}
public static BodyBuilder status(HttpStatus status) {
return null;
}
public static BodyBuilder status(int status) {
return null;
}
public static BodyBuilder ok() {
return null;
}
public static <T> ResponseEntity<T> ok(@Nullable T body) {
return null;
}
public static <T> ResponseEntity<T> of(Optional<T> body) {
return null;
}
public static BodyBuilder created(URI location) {
return null;
}
public static BodyBuilder accepted() {
return null;
}
public static HeadersBuilder<?> noContent() {
return null;
}
public static BodyBuilder badRequest() {
return null;
}
public static HeadersBuilder<?> notFound() {
return null;
}
public static BodyBuilder unprocessableEntity() {
return null;
}
public interface HeadersBuilder<B extends HeadersBuilder<B>> {
B header(String headerName, String... headerValues);
B headers(@Nullable HttpHeaders headers);
B headers(Consumer<HttpHeaders> headersConsumer);
B allow(HttpMethod... allowedMethods);
B eTag(String etag);
B lastModified(ZonedDateTime lastModified);
B lastModified(Instant lastModified);
B lastModified(long lastModified);
B location(URI location);
B cacheControl(CacheControl cacheControl);
B varyBy(String... requestHeaders);
<T> ResponseEntity<T> build();
}
public interface BodyBuilder extends HeadersBuilder<BodyBuilder> {
BodyBuilder contentLength(long contentLength);
BodyBuilder contentType(MediaType contentType);
<T> ResponseEntity<T> body(@Nullable T body);
}
}