Package jodd.util
Class AnnotationParser.Reader
- java.lang.Object
-
- jodd.util.AnnotationParser.Reader
-
- Enclosing class:
- AnnotationParser
public class AnnotationParser.Reader extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<? extends java.lang.annotation.Annotation>annotationType()Returns the annotation type this reader is for.booleanreadBoolean(java.lang.String name, boolean defaultValue)Reads boolean element from the annotation.java.lang.ObjectreadElement(java.lang.String name)Reads annotation element as an object.intreadInt(java.lang.String name, int defaultValue)Reads int element from the annotation.java.lang.StringreadString(java.lang.String name, java.lang.String defaultValue)Reads string element from the annotation.protected java.lang.StringreadStringElement(java.lang.String name)Reads non-empty, trimmed, annotation element value.
-
-
-
Method Detail
-
annotationType
public java.lang.Class<? extends java.lang.annotation.Annotation> annotationType()
Returns the annotation type this reader is for.
-
readStringElement
protected java.lang.String readStringElement(java.lang.String name)
Reads non-empty, trimmed, annotation element value. If annotation value is missing, it will read value from default annotation. If still missing, returnsnull.
-
readElement
public java.lang.Object readElement(java.lang.String name)
Reads annotation element as an object. If annotation value is missing, it will be read from default annotation. If still missing, returnsnull.
-
readString
public java.lang.String readString(java.lang.String name, java.lang.String defaultValue)Reads string element from the annotation. Empty strings are detected and default value is returned instead.
-
readBoolean
public boolean readBoolean(java.lang.String name, boolean defaultValue)Reads boolean element from the annotation.
-
readInt
public int readInt(java.lang.String name, int defaultValue)Reads int element from the annotation.
-
-