com.atlassian.pageobjects.util
Class InjectUtils

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

public class InjectUtils
extends java.lang.Object

Utility methods for custom injections


Nested Class Summary
static interface InjectUtils.FieldVisitor<A extends java.lang.annotation.Annotation>
          A callback method for fields annotated with a certain annotation
 
Constructor Summary
InjectUtils()
           
 
Method Summary
static
<A extends java.lang.annotation.Annotation>
void
forEachFieldWithAnnotation(java.lang.Object instance, java.lang.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 java.lang.annotation.Annotation> void forEachFieldWithAnnotation(java.lang.Object instance,
                                                                                          java.lang.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 © 2013 Atlassian. All Rights Reserved.