Browse Source

Fix spelling

master
Paweł Płazieński 2 months ago
parent
commit
335dd4f75b
6 changed files with 14 additions and 13 deletions
  1. +9
    -8
      README.md
  2. +1
    -1
      pom.xml
  3. +1
    -1
      src/main/java/org/perfectable/introspection/ClassIntrospection.java
  4. +1
    -1
      src/main/java/org/perfectable/introspection/query/AnnotationFilter.java
  5. +1
    -1
      src/main/java/org/perfectable/introspection/query/InheritanceQuery.java
  6. +1
    -1
      src/main/java/org/perfectable/introspection/query/ParametersFilter.java

+ 9
- 8
README.md View File

@@ -4,7 +4,7 @@ Easier Java reflections.

## Introduction

Reflections, an access to program elements structure from themselves, although not recommended in applications are
Reflections, access to program elements structure from themselves, although not recommended in applications are
essential when creating frameworks. Java has somewhat complicated and verbose ways to do reflections, sometimes to the
extremes.

@@ -122,14 +122,14 @@ Class<?> targetClass =
.erasure()
```

Lets say we have following declarations:
Let's say we have following declarations:

```java
interface MessageConsumer<M extends Message, S extends State> {}
class LoginMessageConsumer<S extends LoginState> implements MessageConsumer<LoginMessage, S> {}
```

Lets say variable `messageConsumer` is of class with erasure `LoginMessageConsumer`. In this case `resolve` allows
Let's say variable `messageConsumer` is of class with erasure `LoginMessageConsumer`. In this case `resolve` allows
creating new type that uses same type variable substitution. Expression
`TypeView.of(Consumer.class).resolve(messageConsumer.getClass())` will produce `TypeView` with synthetic
parameterized type `MessageConsumer<LoginMessage, S>` because parameter `M` in `MessageConsumer` was substituted
@@ -140,11 +140,11 @@ to be casted onto `ParameterizedType`, first parameter needs to be extracted, ca

### Proxies

Introspectable adds simple facade for creating proxies. Natively, it supports standard JDK proxies and
Introspectable adds a simple facade for creating proxies. Natively, it supports standard JDK proxies and
javassist + objenesis.

Proxies are built by `org.perfectable.introspection.proxy.ProxyBuilder`. It allows creating proxy by chaining
configuration. After configuration is done, proxies for specific objects can be created by providing
configuration. After the configuration is done, proxies for specific objects can be created by providing
`InvocationHandler`:

#### Example: Remoting
@@ -185,8 +185,8 @@ UserService proxy =
### Annotation building

Sometimes you just need to get instance of annotation type. Be it library interface which assumes that you will extract
the annotation from element, or some method call just requires annotation, assuming that you extract. In either case, you
can build it using `AnnotationBuilder`.
the annotation from element, or some method call just requires annotation, assuming you extract. In either case,
you can build it using `AnnotationBuilder`.

#### Example: Named injection

@@ -246,7 +246,8 @@ class FactoryInjector<F, P> {

### Beans

A lot of code still uses Java Beans as data container. Package `org.perfectable.introspection.bean` helps managing those:
A lot of code still uses Java Beans as data container. Package `org.perfectable.introspection.bean` helps manage
those:

#### Example: Binding form values to bean



+ 1
- 1
pom.xml View File

@@ -61,7 +61,7 @@
<groupId>com.google.auto.service</groupId>
<artifactId>auto-service</artifactId>
<optional>true</optional>
<!-- compilaton only -->
<!-- compilation only -->
</dependency>

<dependency>


+ 1
- 1
src/main/java/org/perfectable/introspection/ClassIntrospection.java View File

@@ -185,7 +185,7 @@ public final class ClassIntrospection<X> {
* <p>Example:
* <pre>
* ClassIntrospection&lt;List&gt; rawIntrospection = ClassIntrospection.of(List.class);
* ClassIntrospection&lt;List&lt;?&gt;&gt; genericntrospection = rawView.adjustWildcards();
* ClassIntrospection&lt;List&lt;?&gt;&gt; genericIntrospection = rawView.adjustWildcards();
* </pre>
*
* <p>This method is equivalent to just casting to parameterized class with wildcards,


+ 1
- 1
src/main/java/org/perfectable/introspection/query/AnnotationFilter.java View File

@@ -25,7 +25,7 @@ public interface AnnotationFilter {
*
* @param annotationClass type of annotation to look for
* @param <A> annotation type
* @return filter for single annotation of speciefied type
* @return filter for single annotation of specified type
*/
static <A extends Annotation> Singular<A> single(Class<A> annotationClass) {
return AnnotationFilters.Single.create(annotationClass);


+ 1
- 1
src/main/java/org/perfectable/introspection/query/InheritanceQuery.java View File

@@ -11,7 +11,7 @@ import static java.util.Objects.requireNonNull;
/**
* Iterable-like container that allows access to supertypes of a class.
*
* <p>This of course only lists types that are actually defined (transitively) by initially-provided class. Altrough
* <p>This of course only lists types that are actually defined (transitively) by initially-provided class. Although
* wildcard types, type variables might be supertype or supertype of specified type, they are not listed.
*
* <p>Instances of this class are immutable, each filtering produces new, modified instance. To obtain query for


+ 1
- 1
src/main/java/org/perfectable/introspection/query/ParametersFilter.java View File

@@ -35,7 +35,7 @@ public interface ParametersFilter {
}

/**
* Creates filter that checks if specified arguments by thier value could be passed to checked executable.
* Creates filter that checks if specified arguments by their value could be passed to checked executable.
*
* @param arguments arguments that would be checked for passing to executable
* @return filter that checks if the executable would accept specified arguments


Loading…
Cancel
Save