keyextractor.java
来自「pojo的mvc框架」· Java 代码 · 共 61 行
JAVA
61 行
package xyz.frame.introspector;import xyz.frame.annotations.In;import xyz.frame.annotations.Out;import xyz.frame.annotations.Read;import xyz.frame.component.FieldAnnotation;/** * Responsible for extracting keys from field annotations * * @author Guilherme Silveira */public class KeyExtractor { /** * Retrieves the key value for an out annotation * * @param info * the annotation * @return the key value */ String extractOutKey(FieldAnnotation<Out> info) { String key = info.getAnnotation().key(); if (key.equals("")) { key = info.getField().getName(); } return key; } /** * Retrieves the key value for an in annotation * * @param info * the annotation * @return the key value */ String extractInKey(FieldAnnotation<In> info) { String key = info.getAnnotation().key(); if (key.equals("")) { key = info.getField().getName(); } return key; } /** * Retrieves the key value for an in annotation * * @param info * the annotation * @return the key value */ String extractReadKey(FieldAnnotation<Read> info) { String key = info.getAnnotation().key(); if (key.equals("")) { key = info.getField().getName(); } return key; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?