summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Enberg <penberg@kernel.org>2011-09-10 17:10:08 +0300
committerPekka Enberg <penberg@kernel.org>2012-03-12 10:55:56 +0200
commitbce766e21e6aa5101781c48530d37b9d3c36e0ab (patch)
treeae4fc248ef10e91cee249ad4da722f9045900f41
parentc6e2db44409f0a932cedc7d8ad24d04183306d93 (diff)
downloadclasspath-bce766e21e6aa5101781c48530d37b9d3c36e0ab.tar.gz
Move fields near top of class definition
Andrew Hughes writes: Can we keep fields near the top of the class? I don't know about others, but personally I find it hard to track things if fields are hiding at the bottom of a class. Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--java/lang/invoke/CallSite.java4
-rw-r--r--java/lang/invoke/ConstantCallSite.java4
-rw-r--r--java/lang/invoke/MethodType.java10
3 files changed, 9 insertions, 9 deletions
diff --git a/java/lang/invoke/CallSite.java b/java/lang/invoke/CallSite.java
index 1f9153392..49b66b570 100644
--- a/java/lang/invoke/CallSite.java
+++ b/java/lang/invoke/CallSite.java
@@ -46,6 +46,8 @@ package java.lang.invoke;
*/
public abstract class CallSite
{
+ private final MethodType type;
+
CallSite(MethodType type)
{
if (type == null)
@@ -87,6 +89,4 @@ public abstract class CallSite
{
return type;
}
-
- private final MethodType type;
}
diff --git a/java/lang/invoke/ConstantCallSite.java b/java/lang/invoke/ConstantCallSite.java
index de273cce4..cfd5ac02b 100644
--- a/java/lang/invoke/ConstantCallSite.java
+++ b/java/lang/invoke/ConstantCallSite.java
@@ -43,6 +43,8 @@ package java.lang.invoke;
public class ConstantCallSite
extends CallSite
{
+ private final MethodHandle target;
+
public ConstantCallSite(MethodHandle target)
{
super(target.type());
@@ -79,6 +81,4 @@ public class ConstantCallSite
{
throw new UnsupportedOperationException();
}
-
- private final MethodHandle target;
}
diff --git a/java/lang/invoke/MethodType.java b/java/lang/invoke/MethodType.java
index 9415f8c49..1aa3b0800 100644
--- a/java/lang/invoke/MethodType.java
+++ b/java/lang/invoke/MethodType.java
@@ -48,6 +48,11 @@ import java.util.List;
public final class MethodType
implements Serializable
{
+ private static final long serialVersionUID = -1L;
+
+ private final Class<?> rtype;
+ private final Class<?>[] ptypes;
+
MethodType(Class<?> rtype, Class<?>[] ptypes)
{
this.rtype = rtype;
@@ -208,9 +213,4 @@ public final class MethodType
{
throw new UnsupportedOperationException();
}
-
- private final Class<?> rtype;
- private final Class<?>[] ptypes;
-
- private static final long serialVersionUID = -1L;
}