private String getDomainType(DomainDeclaredType instantiableType, boolean isCastRequired) { return isCastRequired ? "((" + instantiableType.getSimpleName() + ")" + DOMAIN_NAME + ")" : DOMAIN_NAME; }
private void printDomainType(DomainDeclaredType instantiableType, boolean isCastRequired, FormattedPrintWriter pw) { if (isCastRequired) { pw.print("((", instantiableType.getSimpleName(), ")" + DOMAIN_NAME + ")"); } else { pw.print(DOMAIN_NAME); } }
protected String processMethodBody(String body) { Set<? extends Element> configurations = getClassPathTypes().getElementsAnnotatedWith(TransferObjectMapping.class, roundEnv);//processingEnv.getEnvironmentContext().getRoundEnv().getElementsAnnotatedWith(TransferObjectMapping.class); for (Element configuration: configurations) { if (configuration.getAnnotation(Generated.class) == null && (configuration.getKind().isClass() || configuration.getKind().isInterface())) { ConfigurationContext configurationContext = new ConfigurationContext(processingEnv.getEnvironmentContext().getConfigurationEnv()); ConfigurationTypeElement configurationTypeElement = new ConfigurationTypeElement(configuration, processingEnv.getEnvironmentContext(), configurationContext); configurationContext.addConfiguration(configurationTypeElement); String domainElementName = configurationTypeElement.getInstantiableDomainSpecified() == null ? null : configurationTypeElement.getInstantiableDomainSpecified().getSimpleName().toString(); if (domainElementName != null) { body = replaceDomainType(domainElementName, configurationTypeElement.getDto(), body); } domainElementName = configurationTypeElement.getDomain().getSimpleName(); body = replaceDomainType(domainElementName, configurationTypeElement.getDto(), body); } } return body; }