/** * Get the map of {@link DataField} fields/parameters to {@link DataField} instances. */ private static Map<String, DataField> dataFieldAnnotationMap(final InjectionContext context, final MetaClass templateType) { final String dataFieldAnnoMapName = dataFieldAnnotationMapName(templateType); @SuppressWarnings("unchecked") Map<String, DataField> dataFieldTypes = (Map<String, DataField>) context.getAttribute(dataFieldAnnoMapName); if (dataFieldTypes == null) { dataFieldTypes = new LinkedHashMap<>(); context.setAttribute(dataFieldAnnoMapName, dataFieldTypes); } return dataFieldTypes; }
/** * Get the map of {@link DataField} names and {@link MetaClass} types. */ @SuppressWarnings("unchecked") private static Map<String, MetaClass> dataFieldTypeMap(final InjectionContext context, final MetaClass templateType) { final String dataFieldTypeMapName = dataFieldTypeMapName(templateType); Map<String, MetaClass> dataFieldTypes = (Map<String, MetaClass>) context.getAttribute( dataFieldTypeMapName); if (dataFieldTypes == null) { dataFieldTypes = new LinkedHashMap<>(); context.setAttribute(dataFieldTypeMapName, dataFieldTypes); } return dataFieldTypes; }
/** * Get the map of {@link DataField} fields/parameters to {@link DataField} instances. */ private static Map<String, DataField> dataFieldAnnotationMap(final InjectionContext context, final MetaClass templateType) { final String dataFieldAnnoMapName = dataFieldAnnotationMapName(templateType); @SuppressWarnings("unchecked") Map<String, DataField> dataFieldTypes = (Map<String, DataField>) context.getAttribute(dataFieldAnnoMapName); if (dataFieldTypes == null) { dataFieldTypes = new LinkedHashMap<>(); context.setAttribute(dataFieldAnnoMapName, dataFieldTypes); } return dataFieldTypes; }
/** * Get the map of {@link DataField} names and {@link MetaClass} types. */ @SuppressWarnings("unchecked") private static Map<String, MetaClass> dataFieldTypeMap(final InjectionContext context, final MetaClass templateType) { final String dataFieldTypeMapName = dataFieldTypeMapName(templateType); Map<String, MetaClass> dataFieldTypes = (Map<String, MetaClass>) context.getAttribute( dataFieldTypeMapName); if (dataFieldTypes == null) { dataFieldTypes = new LinkedHashMap<>(); context.setAttribute(dataFieldTypeMapName, dataFieldTypes); } return dataFieldTypes; }
/** * Get the map of {@link DataField} names and {@link Statement} instances. */ @SuppressWarnings("unchecked") private static Map<String, Statement> dataFieldMap(final InjectionContext context, final MetaClass templateType) { final String dataFieldMapName = dataFieldMapName(templateType); Map<String, Statement> dataFields = (Map<String, Statement>) context.getAttribute( dataFieldMapName); if (dataFields == null) { dataFields = new LinkedHashMap<>(); context.setAttribute(dataFieldMapName, dataFields); } return dataFields; }
/** * Get the map of {@link DataField} names and {@link Statement} instances. */ @SuppressWarnings("unchecked") private static Map<String, Statement> dataFieldMap(final InjectionContext context, final MetaClass templateType) { final String dataFieldMapName = dataFieldMapName(templateType); Map<String, Statement> dataFields = (Map<String, Statement>) context.getAttribute( dataFieldMapName); if (dataFields == null) { dataFields = new LinkedHashMap<>(); context.setAttribute(dataFieldMapName, dataFields); } return dataFields; }
/** * Get a map of all previously constructed {@link Template} object types */ @SuppressWarnings("unchecked") private Map<MetaClass, BuildMetaClass> getConstructedTemplateTypes(final Decorable decorable) { Map<MetaClass, BuildMetaClass> result = (Map<MetaClass, BuildMetaClass>) decorable.getInjectionContext().getAttribute( CONSTRUCTED_TEMPLATE_SET_KEY); if (result == null) { result = new LinkedHashMap<>(); decorable.getInjectionContext().setAttribute(CONSTRUCTED_TEMPLATE_SET_KEY, result); } return result; }
/** * Get a map of all previously constructed {@link Template} object types */ @SuppressWarnings("unchecked") private Map<MetaClass, BuildMetaClass> getConstructedTemplateTypes(final Decorable decorable) { Map<MetaClass, BuildMetaClass> result = (Map<MetaClass, BuildMetaClass>) decorable.getInjectionContext().getAttribute( CONSTRUCTED_TEMPLATE_SET_KEY); if (result == null) { result = new LinkedHashMap<>(); decorable.getInjectionContext().setAttribute(CONSTRUCTED_TEMPLATE_SET_KEY, result); } return result; }