com.atlassian.pageobjects.util
Class InjectUtils

java.lang.Object
  extended by com.atlassian.pageobjects.util.InjectUtils

public class InjectUtils
extends Object

Utility methods for custom injections


Nested Class Summary
static interface InjectUtils.FieldVisitor<A extends Annotation>
          A callback method for fields annotated with a certain annotation
 
Constructor Summary
InjectUtils()
           
 
Method Summary
static
<A extends Annotation>
void
forEachFieldWithAnnotation(Object instance, Class<A> annotation, InjectUtils.FieldVisitor<A> fieldVisitor)
          Executes the callback for each private field marked with the desired annotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InjectUtils

public InjectUtils()
Method Detail

forEachFieldWithAnnotation

public static <A extends Annotation> void forEachFieldWithAnnotation(Object instance,
                                                                     Class<A> annotation,
                                                                     InjectUtils.FieldVisitor<A> fieldVisitor)
Executes the callback for each private field marked with the desired annotation

Type Parameters:
A - The annotation type to scan for
Parameters:
instance - The object to inspect
annotation - The annotation to scan for
fieldVisitor - The callback when a field is found


Copyright © 2014 Atlassian. All rights reserved.