T
- the generic type of the property.public class PropertyTypeRef<T> extends Object
The following is an example of proper usage of this class:
// Retrieves the value of the property "powers" List<String> powers =property
("powers").ofType
(newTypeRef
<List<String>>() {}).in
(jedi).get
(); // Sets the value of the property "powers" List<String> powers = new ArrayList<String>(); powers.add("heal");property
("powers").ofType
(newTypeRef
<List<String>>() {}).in
(jedi).set
(powers);
public Invoker<T> in(Object target)
target
- the object containing the property of interest.NullPointerException
- if the given target is null
.ReflectionError
- if a property with a matching name and type cannot be found.Copyright © 2007–2016. All rights reserved.