Modifier and Type | Class and Description |
---|---|
private static class |
Modifier and Type | Field and Description |
---|---|
private transient volatile Method[] | |
private final Map | |
private static final long | |
private final Class |
Access | Constructor and Description |
---|---|
pack-priv |
Modifier and Type | Method and Description |
---|---|
private AnnotationInvocationHandler | |
private Object | cloneArray(Object array)
This method, which clones its array argument, would not be necessary if Cloneable had a public clone method. |
private Method[] | |
private static Stream | |
private static Stream | |
private static Stream | |
private static Stream | |
private static Stream | |
private Boolean | |
private Method[] | |
private int | |
public Object | invoke(Object
the proxy instance that the method was invoked on proxy, Method the method, Object[] Method instance corresponding to
the interface method invoked on the proxy instance. The declaring
class of the Method object will be the interface that
the method was declared in, which may be a superinterface of the
proxy interface that the proxy class inherits the method through.an array of objects containing the values of the
arguments passed in the method invocation on the proxy instance,
or args)null if interface method takes no arguments.
Arguments of primitive types are wrapped in instances of the
appropriate primitive wrapper class, such as
java.lang.Integer or java.lang.Boolean .Implements java. Processes a method invocation on a proxy instance and returns the result. |
private static boolean | |
private static boolean | memberValueEquals(Object v1, Object v2)
Returns true iff the two member values in "dynamic proxy return form" are equal using the appropriate equality function depending on the member type. |
private static int | memberValueHashCode(Object value)
Computes hashCode of a member value (in "dynamic proxy return form") |
pack-priv Map | |
private static String | memberValueToString(Object value)
Translates a member value (in "dynamic proxy return form") into a string. |
private static String | |
private void | |
private static String | |
private static String | toSourceString(Class<?> clazz)
Translates a Class value to a form suitable for use in the string representation of an annotation. |
private static String | |
private static String | |
private static String | |
private static String | |
private static String | |
private static String | |
private static String | toSourceString(String s)
Return a string suitable for use in the string representation of an annotation. |
private String | |
private void | validateAnnotationMethods(Method[] memberMethods)
Validates that a method is structurally appropriate for an annotation type. |
memberMethods | back to summary |
---|---|
private transient volatile Method[] memberMethods |
memberValues | back to summary |
---|---|
private final Map<String, Object> memberValues
|
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID
|
type | back to summary |
---|---|
private final Class<? extends Annotation> type |
AnnotationInvocationHandler | back to summary |
---|---|
pack-priv AnnotationInvocationHandler(Class<? extends Annotation> type, Map<String, Object> memberValues) |
asOneOfUs | back to summary |
---|---|
private AnnotationInvocationHandler asOneOfUs(Object o) Returns an object's invocation handler if that object is a dynamic proxy with a handler of type AnnotationInvocationHandler. Returns null otherwise. |
cloneArray | back to summary |
---|---|
private Object cloneArray(Object array) This method, which clones its array argument, would not be necessary if Cloneable had a public clone method. |
computeMemberMethods | back to summary |
---|---|
private Method[] computeMemberMethods()
|
convert | back to summary |
---|---|
private static Stream |
convert | back to summary |
---|---|
private static Stream |
convert | back to summary |
---|---|
private static Stream |
convert | back to summary |
---|---|
private static Stream |
convert | back to summary |
---|---|
private static Stream |
equalsImpl | back to summary |
---|---|
private Boolean equalsImpl(Object proxy, Object o) Implementation of dynamicProxy.equals(Object o) |
getMemberMethods | back to summary |
---|---|
private Method[] getMemberMethods() Returns the member methods for our annotation type. These are obtained lazily and cached, as they're expensive to obtain and we only need them if our equals method is invoked (which should be rare). |
hashCodeImpl | back to summary |
---|---|
private int hashCodeImpl() Implementation of dynamicProxy.hashCode() |
invoke | back to summary |
---|---|
public Object invoke(Object proxy, Method method, Object[] args) Implements java. Doc from java. Processes a method invocation on a proxy instance and returns the result. This method will be invoked on an invocation handler when a method is invoked on a proxy instance that it is associated with.
|
isPrintableAscii | back to summary |
---|---|
private static boolean isPrintableAscii(char ch) Is a character printable ASCII? |
memberValueEquals | back to summary |
---|---|
private static boolean memberValueEquals(Object v1, Object v2) Returns true iff the two member values in "dynamic proxy return form" are equal using the appropriate equality function depending on the member type. The two values will be of the same type unless one of the containing annotations is ill-formed. If one of the containing annotations is ill-formed, this method will return false unless the two members are identical object references. |
memberValueHashCode | back to summary |
---|---|
private static int memberValueHashCode(Object value) Computes hashCode of a member value (in "dynamic proxy return form") |
memberValues | back to summary |
---|---|
pack-priv Map Gets an unmodifiable view on the member values. |
memberValueToString | back to summary |
---|---|
private static String memberValueToString(Object value) Translates a member value (in "dynamic proxy return form") into a string. |
quote | back to summary |
---|---|
private static String quote(char ch) Escapes a character if it has an escape sequence or is non-printable ASCII. Leaves non-ASCII characters alone. |
readObject | back to summary |
---|---|
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
|
stringStreamToString | back to summary |
---|---|
private static String stringStreamToString(Stream<String> stream) |
toSourceString | back to summary |
---|---|
private static String toSourceString(Class<?> clazz) Translates a Class value to a form suitable for use in the string representation of an annotation. |
toSourceString | back to summary |
---|---|
private static String toSourceString(float f) |
toSourceString | back to summary |
---|---|
private static String toSourceString(double d) |
toSourceString | back to summary |
---|---|
private static String toSourceString(char c) |
toSourceString | back to summary |
---|---|
private static String toSourceString(byte b) |
toSourceString | back to summary |
---|---|
private static String toSourceString(long ell) |
toSourceString | back to summary |
---|---|
private static String toSourceString(Enum<?> enumConstant) |
toSourceString | back to summary |
---|---|
private static String toSourceString(String s) Return a string suitable for use in the string representation of an annotation. |
toStringImpl | back to summary |
---|---|
private String toStringImpl() Implementation of dynamicProxy.toString() |
validateAnnotationMethods | back to summary |
---|---|
private void validateAnnotationMethods(Method[] memberMethods) Validates that a method is structurally appropriate for an annotation type. As of Java SE 8, annotation types cannot contain static methods and the declared methods of an annotation type must take zero arguments and there are restrictions on the return type. |
Modifier and Type | Field and Description |
---|---|
private static final long | |
private static final long | |
private static final Unsafe |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
pack-priv static void | |
pack-priv static void |
memberValuesOffset | back to summary |
---|---|
private static final long memberValuesOffset |
typeOffset | back to summary |
---|---|
private static final long typeOffset |
unsafe | back to summary |
---|---|
private static final Unsafe unsafe |
UnsafeAccessor | back to summary |
---|---|
private UnsafeAccessor() |
setMemberValues | back to summary |
---|---|
pack-priv static void setMemberValues(AnnotationInvocationHandler o, Map<String, Object> memberValues) |
setType | back to summary |
---|---|
pack-priv static void setType(AnnotationInvocationHandler o, Class<? extends Annotation> type) |