|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jitr.JitrUtils
public final class JitrUtils
Provides various simple utility methods.
| Method Summary | |
|---|---|
static java.util.Collection<java.lang.reflect.Field> |
getAnnotatedDeclaredFields(java.lang.Class<?> clazz,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Finds any declared fields in the given class with the given annotation. |
static java.lang.reflect.Field |
getMostSpecificAnnotatedDeclaredField(java.lang.Class<?> clazz,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
Finds an annotated field amongst a hierarchy of classes. |
static int |
getRandomUnusedPort()
Provides a quick way to get a random, unused port by opening a ServerSocket and
getting the locally assigned port for the server socket. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.util.Collection<java.lang.reflect.Field> getAnnotatedDeclaredFields(java.lang.Class<?> clazz,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
public static java.lang.reflect.Field getMostSpecificAnnotatedDeclaredField(java.lang.Class<?> clazz,
java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
JitrException - When multiple annotated fields are found in any one class.
public static int getRandomUnusedPort()
throws JitrException
ServerSocket and
getting the locally assigned port for the server socket.
JitrException - Thrown if any IOExceptions are thrown by the underlying calls to
ServerSocket.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||