Package org.powermock.reflect.internal.matcherstrategies

Examples of org.powermock.reflect.internal.matcherstrategies.AssignableToFieldTypeMatcherStrategy


   *            the object to modify
   * @param value
   *            the new value of the field
   */
  public static void setInternalState(Object object, Object value) {
    setField(object, value, findFieldInHierarchy(object, new AssignableToFieldTypeMatcherStrategy(getType(value))));
  }
View Full Code Here


   *            the new value of the field
   * @param where
   *            the class in the hierarchy where the field is defined
   */
  public static void setInternalState(Object object, Object value, Class<?> where) {
    setField(object, value, findField(object, new AssignableToFieldTypeMatcherStrategy(getType(value)), where));
  }
View Full Code Here

   * @param type
   *            The type to look for.
   * @return A set of all fields of the particular type.
   */
  public static Set<Field> getFieldsOfType(Object object, Class<?> type) {
    return findAllFieldsUsingStrategy(new AssignableToFieldTypeMatcherStrategy(type), object, true, getType(object));
  }
View Full Code Here

TOP

Related Classes of org.powermock.reflect.internal.matcherstrategies.AssignableToFieldTypeMatcherStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.