
com.devonfw.cobigen.javaplugin.model.JavaModelUtil Maven / Gradle / Ivy
package com.devonfw.cobigen.javaplugin.model;
import java.util.List;
import java.util.Map;
/**
* * The {@link JavaModelUtil} class provides helper functions to access the given model.
* @author fkreis (25.09.2014)
*/
public class JavaModelUtil {
/**
* Returns the model root-element ({@link ModelConstant#MODEL_ROOT})
*
* @param model
* raw model
* @return the model root-element ({@link ModelConstant#MODEL_ROOT})
*/
public static Map getRoot(Map model) {
@SuppressWarnings("unchecked")
Map pojoMap = (Map) model.get(ModelConstant.MODEL_ROOT);
return pojoMap;
}
/**
* Returns the model annotations-element ({@link ModelConstant#ANNOTATIONS})
*
* @param model
* raw model
* @return the model annotations-element ({@link ModelConstant#ANNOTATIONS})
*/
public static Map getAnnotations(Map model) {
@SuppressWarnings("unchecked")
Map annotations = (Map) model.get(ModelConstant.ANNOTATIONS);
return annotations;
}
/**
* Returns the list of all field models ({@link ModelConstant#FIELDS})
* @param model
* raw model
* @return the list of all field models
*/
public static List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy