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
47f7d00f
Commit
47f7d00f
authored
11 years ago
by
Elliott Hughes
Browse files
Options
Download
Email Patches
Plain Diff
Return a more specific type from AnnotationFactory.createAnnotation.
Change-Id: Ic73ff86addb689c4b67298d45385a293ccc4ecef
parent
4323ab38
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 @
47f7d00f
...
...
@@ -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