Remove Kotlin "translations" of Java APIs in the reference manual
See gh-26447
This commit is contained in:
@@ -40,7 +40,7 @@ following listing provides an overview of the `Resource` interface. See the
|
||||
{api-spring-framework}/core/io/Resource.html[`Resource`] javadoc for further details.
|
||||
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
.Java
|
||||
----
|
||||
public interface Resource extends InputStreamSource {
|
||||
@@ -70,44 +70,6 @@ following listing provides an overview of the `Resource` interface. See the
|
||||
String getFilename();
|
||||
|
||||
String getDescription();
|
||||
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface Resource : InputStreamSource {
|
||||
|
||||
fun exists(): Boolean
|
||||
|
||||
fun isReadable(): Boolean
|
||||
|
||||
fun isOpen(): Boolean
|
||||
|
||||
fun isFile(): Boolean
|
||||
|
||||
fun getURL(): URL
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun getURI(): URI
|
||||
|
||||
val file: File
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun readableChannel(): ReadableByteChannel
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun contentLength(): long
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun lastModified(): long
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun createRelative(relativePath: String): Resource
|
||||
|
||||
val filename: String
|
||||
|
||||
val description: String
|
||||
}
|
||||
----
|
||||
|
||||
@@ -115,7 +77,7 @@ As the definition of the `Resource` interface shows, it extends the `InputStream
|
||||
interface. The following listing shows the definition of the `InputStreamSource`
|
||||
interface:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
.Java
|
||||
----
|
||||
public interface InputStreamSource {
|
||||
@@ -123,14 +85,6 @@ interface:
|
||||
InputStream getInputStream() throws IOException;
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface InputStreamSource {
|
||||
|
||||
val inputStream: InputStream
|
||||
}
|
||||
----
|
||||
|
||||
Some of the most important methods from the `Resource` interface are:
|
||||
|
||||
@@ -303,7 +257,7 @@ The `ResourceLoader` interface is meant to be implemented by objects that can re
|
||||
(that is, load) `Resource` instances. The following listing shows the `ResourceLoader`
|
||||
interface definition:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
.Java
|
||||
----
|
||||
public interface ResourceLoader {
|
||||
@@ -313,16 +267,6 @@ interface definition:
|
||||
ClassLoader getClassLoader();
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface ResourceLoader {
|
||||
|
||||
fun getResource(location: String): Resource
|
||||
|
||||
fun getClassLoader(): ClassLoader
|
||||
}
|
||||
----
|
||||
|
||||
All application contexts implement the `ResourceLoader` interface. Therefore, all
|
||||
application contexts may be used to obtain `Resource` instances.
|
||||
@@ -426,7 +370,7 @@ The `ResourcePatternResolver` interface is an extension to the `ResourceLoader`
|
||||
which defines a strategy for resolving a location pattern (for example, an Ant-style path
|
||||
pattern) into `Resource` objects.
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
.Java
|
||||
----
|
||||
public interface ResourcePatternResolver extends ResourceLoader {
|
||||
@@ -434,20 +378,6 @@ pattern) into `Resource` objects.
|
||||
String CLASSPATH_ALL_URL_PREFIX = "classpath*:";
|
||||
|
||||
Resource[] getResources(String locationPattern) throws IOException;
|
||||
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface ResourcePatternResolver: ResourceLoader {
|
||||
|
||||
@JvmField
|
||||
val CLASSPATH_ALL_URL_PREFIX: String = "classpath*:"
|
||||
|
||||
@Throws(IOException::class)
|
||||
fun getResources(locationPattern: String): Resource[]
|
||||
|
||||
}
|
||||
----
|
||||
|
||||
@@ -492,7 +422,7 @@ The `ResourceLoaderAware` interface is a special callback interface which identi
|
||||
components that expect to be provided a `ResourceLoader` reference. The following listing
|
||||
shows the definition of the `ResourceLoaderAware` interface:
|
||||
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
[source,java,indent=0,subs="verbatim,quotes"]
|
||||
.Java
|
||||
----
|
||||
public interface ResourceLoaderAware {
|
||||
@@ -500,14 +430,6 @@ shows the definition of the `ResourceLoaderAware` interface:
|
||||
void setResourceLoader(ResourceLoader resourceLoader);
|
||||
}
|
||||
----
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
.Kotlin
|
||||
----
|
||||
interface ResourceLoaderAware {
|
||||
|
||||
fun setResourceLoader(resourceLoader: ResourceLoader)
|
||||
}
|
||||
----
|
||||
|
||||
When a class implements `ResourceLoaderAware` and is deployed into an application context
|
||||
(as a Spring-managed bean), it is recognized as `ResourceLoaderAware` by the application
|
||||
|
||||
Reference in New Issue
Block a user