T - the generic type of the field.public class StaticFieldTypeRef<T>
extends java.lang.Object
The following is an example of proper usage of this class:
// Retrieves the value of the static field "commonPowers" List<String> commmonPowers =staticField("commonPowers").ofType(newTypeRef<List<String>>() {}).in(Jedi.class).get(); // Sets the value of the static field "commonPowers" List<String> commonPowers = new ArrayList<String>(); commonPowers.add("jump");staticField("commonPowers").ofType(newTypeRef<List<String>>() {}).in(Jedi.class).set(commonPowers);
public Invoker<T> in(java.lang.Class<?> target)
target - the type containing the static field of interest.java.lang.NullPointerException - if the given target is null.ReflectionError - if a static field with a matching name and type cannot be found.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.