Debian Codegraph @

src/main/java/org/fest/reflect/field/package.html

raw
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <!--
6 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
7 in compliance with the License. You may obtain a copy of the License at
8
9 http://www.apache.org/licenses/LICENSE-2.0
10
11 Unless required by applicable law or agreed to in writing, software distributed under the License
12 is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 or implied. See the License for the specific language governing permissions and limitations under
14 the License.
15
16 Copyright @2007-2009 the original author or authors.
17 -->
18 </head>
19 <body bgcolor="white">
20 <p>
21 Provides a &quot;fluent&quot; API
22 for field access via the Java Reflection API.
23 </p>
24 <p>
25 <strong>Note:</strong> Classes in this package are not intended to be used directly. To use them, you need to use the
26 class <code>{@link org.fest.reflect.core.Reflection org.fest.reflect.core.Reflection}</code>.
27 </p>
28 <p>
29 Here are some examples:
30 <pre>
31 // import static {@link org.fest.reflect.core.Reflection org.fest.reflect.core.Reflection}.*;
32
33 // Retrieves the value of the field "name"
34 String name = {@link org.fest.reflect.core.Reflection#field(String) field}("name").{@link org.fest.reflect.field.FieldName#ofType(Class) ofType}(String.class).{@link org.fest.reflect.field.FieldType#in(Object) in}(person).{@link org.fest.reflect.field.Invoker#get() get}();
35
36 // Sets the value of the field "name" to "Yoda"
37 {@link org.fest.reflect.core.Reflection#field(String) field}("name").{@link org.fest.reflect.field.FieldName#ofType(Class) ofType}(String.class).{@link org.fest.reflect.field.FieldType#in(Object) in}(person).{@link org.fest.reflect.field.Invoker#set(Object) set}("Yoda");
38
39 // Retrieves the value of the static field "count"
40 int count = {@link org.fest.reflect.core.Reflection#staticField(String) staticField}("count").{@link org.fest.reflect.field.StaticFieldName#ofType(Class) ofType}(int.class).{@link org.fest.reflect.field.StaticFieldType#in(Class) in}(Person.class).{@link org.fest.reflect.field.Invoker#get() get}();
41
42 // Sets the value of the static field "count" to 3
43 {@link org.fest.reflect.core.Reflection#staticField(String) field}("count").{@link org.fest.reflect.field.StaticFieldName#ofType(Class) ofType}(int.class).{@link org.fest.reflect.field.StaticFieldType#in(Class) in}(Person.class).{@link org.fest.reflect.field.Invoker#set(Object) set}(3);
44 </pre>
45 </p>
46 </body>
47 </html>