Skip to content
Permalink
Browse files

[#57] Whitespace fixes

  • Loading branch information
lukaseder committed Dec 10, 2019
1 parent 991bb45 commit 52ec31d643a0a86c9d9128fb7eff006f195bf642
@@ -735,15 +735,14 @@ public Reflect create(Object... args) throws ReflectException {
}

/**
* Create a proxy for the wrapped object allowing to typesafely invoke methods
* on it using a custom interface.
*
* @param proxyType The interface type that is implemented by the
* proxy
* @param additionalInterfaces Additional interfaces that are implemented by the
* proxy
* @return A proxy for the wrapped object
*/
* Create a proxy for the wrapped object allowing to typesafely invoke
* methods on it using a custom interface.
*
* @param proxyType The interface type that is implemented by the proxy
* @param additionalInterfaces Additional interfaces that are implemented by
* the proxy
* @return A proxy for the wrapped object
*/
@SuppressWarnings("unchecked")
public <P> P as(final Class<P> proxyType, final Class<?>... additionalInterfaces) {
final boolean isMap = (object instanceof Map);
@@ -735,15 +735,14 @@ public Reflect create(Object... args) throws ReflectException {
}

/**
* Create a proxy for the wrapped object allowing to typesafely invoke methods
* on it using a custom interface.
*
* @param proxyType The interface type that is implemented by the
* proxy
* @param additionalInterfaces Additional interfaces that are implemented by the
* proxy
* @return A proxy for the wrapped object
*/
* Create a proxy for the wrapped object allowing to typesafely invoke
* methods on it using a custom interface.
*
* @param proxyType The interface type that is implemented by the proxy
* @param additionalInterfaces Additional interfaces that are implemented by
* the proxy
* @return A proxy for the wrapped object
*/
@SuppressWarnings("unchecked")
public <P> P as(final Class<P> proxyType, final Class<?>... additionalInterfaces) {
final boolean isMap = (object instanceof Map);
@@ -777,7 +776,7 @@ else if (length == 1 && name.startsWith("set")) {


if (method.isDefault()) {
Lookup proxyLookup = null;
Lookup proxyLookup = null;

// Java 9 version
if (CACHED_LOOKUP_CONSTRUCTOR == null) {
@@ -788,17 +787,17 @@ else if (length == 1 && name.startsWith("set")) {



// Java 9 version for Java 8 distribution (jOOQ Open Source Edition)
if (proxyLookup == null)
proxyLookup = onClass(MethodHandles.class)
.call("privateLookupIn", proxyType, MethodHandles.lookup())
.call("in", proxyType)
.<Lookup>get();
// Java 9 version for Java 8 distribution (jOOQ Open Source Edition)
if (proxyLookup == null)
proxyLookup = onClass(MethodHandles.class)
.call("privateLookupIn", proxyType, MethodHandles.lookup())
.call("in", proxyType)
.<Lookup> get();
}

// Java 8 version
else
proxyLookup = CACHED_LOOKUP_CONSTRUCTOR.newInstance(proxyType);
proxyLookup = CACHED_LOOKUP_CONSTRUCTOR.newInstance(proxyType);

return proxyLookup.unreflectSpecial(method, proxyType)
.bindTo(proxy)
@@ -735,15 +735,14 @@ public Reflect create(Object... args) throws ReflectException {
}

/**
* Create a proxy for the wrapped object allowing to typesafely invoke methods
* on it using a custom interface.
*
* @param proxyType The interface type that is implemented by the
* proxy
* @param additionalInterfaces Additional interfaces that are implemented by the
* proxy
* @return A proxy for the wrapped object
*/
* Create a proxy for the wrapped object allowing to typesafely invoke
* methods on it using a custom interface.
*
* @param proxyType The interface type that is implemented by the proxy
* @param additionalInterfaces Additional interfaces that are implemented by
* the proxy
* @return A proxy for the wrapped object
*/
@SuppressWarnings("unchecked")
public <P> P as(final Class<P> proxyType, final Class<?>... additionalInterfaces) {
final boolean isMap = (object instanceof Map);
@@ -777,28 +776,28 @@ else if (length == 1 && name.startsWith("set")) {

/* [java-8] */
if (method.isDefault()) {
Lookup proxyLookup = null;
Lookup proxyLookup = null;

// Java 9 version
if (CACHED_LOOKUP_CONSTRUCTOR == null) {

/* [java-9] */
proxyLookup = MethodHandles
.privateLookupIn(proxyType, MethodHandles.lookup())
.in(proxyType);
/* [java-9] */
proxyLookup = MethodHandles
.privateLookupIn(proxyType, MethodHandles.lookup())
.in(proxyType);
/* [/java-9] */

// Java 9 version for Java 8 distribution (jOOQ Open Source Edition)
if (proxyLookup == null)
proxyLookup = onClass(MethodHandles.class)
.call("privateLookupIn", proxyType, MethodHandles.lookup())
.call("in", proxyType)
.<Lookup>get();
// Java 9 version for Java 8 distribution (jOOQ Open Source Edition)
if (proxyLookup == null)
proxyLookup = onClass(MethodHandles.class)
.call("privateLookupIn", proxyType, MethodHandles.lookup())
.call("in", proxyType)
.<Lookup> get();
}

// Java 8 version
else
proxyLookup = CACHED_LOOKUP_CONSTRUCTOR.newInstance(proxyType);
proxyLookup = CACHED_LOOKUP_CONSTRUCTOR.newInstance(proxyType);

return proxyLookup.unreflectSpecial(method, proxyType)
.bindTo(proxy)

0 comments on commit 52ec31d

Please sign in to comment.
You can’t perform that action at this time.