Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
libcore
Commits
ce6f7cc5
Commit
ce6f7cc5
authored
11 years ago
by
Elliott Hughes
Committed by
Gerrit Code Review
11 years ago
Browse files
Options
Download
Plain Diff
Merge "Return a more specific type from AnnotationFactory.createAnnotation."
parents
4323ab38
47f7d00f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
luni/src/main/java/libcore/reflect/AnnotationFactory.java
luni/src/main/java/libcore/reflect/AnnotationFactory.java
+4
-4
No files found.
luni/src/main/java/libcore/reflect/AnnotationFactory.java
View file @
ce6f7cc5
...
...
@@ -89,11 +89,11 @@ public final class AnnotationFactory implements InvocationHandler, Serializable
* @param elements name-value pairs representing elements of the annotation
* @return a new annotation instance
*/
public
static
Annotation
createAnnotation
(
Class
<?
extends
Annotation
>
annotationType
,
AnnotationMember
[]
elements
)
{
public
static
<
A
extends
Annotation
>
A
createAnnotation
(
Class
<?
extends
Annotation
>
annotationType
,
AnnotationMember
[]
elements
)
{
AnnotationFactory
factory
=
new
AnnotationFactory
(
annotationType
,
elements
);
return
(
A
nnotation
)
Proxy
.
newProxyInstance
(
annotationType
.
getClassLoader
(),
new
Class
[]{
annotationType
},
factory
);
return
(
A
)
Proxy
.
newProxyInstance
(
annotationType
.
getClassLoader
(),
new
Class
[]{
annotationType
},
factory
);
}
private
final
Class
<?
extends
Annotation
>
klazz
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment