DomainType domainReference = currentElement.getDomainReference(getEntityResolver(), currentPath); if (domainReference != null && domainReference.getKind().isDeclared()) { currentElement = (DomainDeclaredType)domainReference; ExecutableElement nestedIdMethod = currentElement.getIdMethod(getEntityResolver());
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((enclosedClass == null) ? 0 : enclosedClass.hashCode()); result = prime * result + ((kind == null) ? 0 : kind.hashCode()); result = prime * result + ((packageName == null) ? 0 : packageName.hashCode()); result = prime * result + ((simpleName == null) ? 0 : simpleName.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((getTypeVariables() == null) ? 0 : getTypeVariables().hashCode()); return result; }
(context.getDomainMethodReturnType().getKind().equals(MutableTypeKind.TYPEVAR) ? "(" + context.getConverter().getDomain().toString(ClassSerializer.SIMPLE, true) + ")" : "") + TransferObjectElementPrinter.DOMAIN_NAME + "." + context.getDomainFieldName(), context.getConverter().getDomain()); TransferObjectMappingAccessor transferObjectMappingAccessor = new TransferObjectMappingAccessor(context.getDtoMethod(), processingEnv); pw.print(TransferObjectElementPrinter.RESULT_NAME + "." + MethodHelper.toSetter(context.getDtoFieldName()) + "("); if (context.getDomainMethodReturnType().getKind().equals(MutableTypeKind.TYPEVAR)) { pw.print("(" + ConverterTypeElement.DTO_TYPE_ARGUMENT_PREFIX + "_" + ((MutableTypeVariable)context.getDomainMethodReturnType()).getVariable().toString() + ")");
if (context.getDtoFieldType().getKind().equals(MutableTypeMirror.MutableTypeKind.CLASS) || context.getDtoFieldType().getKind().equals(MutableTypeMirror.MutableTypeKind.INTERFACE)) { }else if (context.getDtoFieldType().getKind().equals(MutableTypeMirror.MutableTypeKind.TYPEVAR)) { Set<? extends MutableTypeMirror> lowerBounds = ((MutableTypeVariable) context.getDtoFieldType()).getLowerBounds();
if (domainType.getKind().isDeclared()) { idMethod = configurationElement.getInstantiableDomain().getIdMethod(entityResolver); if (dtoSuperClass != null && dtoSuperClass.getConverter() != null && dtoSuperClass.getKind().equals(MutableTypeKind.CLASS)) { MutableDeclaredType fieldType = processingEnv.getTypeUtils().getDeclaredType(processingEnv.getTypeUtils().toMutableType(Class.class), new MutableDeclaredType[] { dtoSuperClass.getDomain() });
if (domainType.getKind().isDeclared()) { domainIdMethod = configurationElement.getInstantiableDomain().getIdMethod(entityResolver); if (dtoSuperClass != null && dtoSuperClass.getConverter() != null && dtoSuperClass.getKind().equals(MutableTypeKind.CLASS)) { MutableDeclaredType fieldType = processingEnv.getTypeUtils().getDeclaredType(processingEnv.getTypeUtils().toMutableType(Class.class), new MutableDeclaredType[] { dtoSuperClass });
if (!instantiableDomainReference.getKind().isDeclared()) { processingEnv.getMessager().printMessage( Kind.ERROR, if (referenceDomainType.getKind().isDeclared()) { MutableDeclaredType fieldType = processingEnv.getTypeUtils().getDeclaredType(processingEnv.getTypeUtils().toMutableType(Class.class), new MutableDeclaredType[] { referenceDomainType.getDto() });
if (element.getKind().isDeclared()) {
if (printableType.getKind().equals(MutableTypeKind.CLASS) || printableType.getKind().equals(MutableTypeKind.INTERFACE)) { printableType = ((MutableDeclaredType)printableType).clone().stripTypeParametersTypes().stripWildcards(); boolean castRequired = (printableType.getKind().equals(MutableTypeKind.INTERFACE) || printableType.getKind().equals(MutableTypeKind.CLASS)) && ((MutableDeclaredType)printableType).hasTypeParameters() && ((MutableDeclaredType)printableType).getTypeVariables().size() == 1 &&
pw.print(type.getKind().toString() + " " + type.toString(ClassSerializer.SIMPLE, false)); if (superClassType != null && !superClassType.toString(ClassSerializer.CANONICAL).equals(Object.class.getCanonicalName()) && !type.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(" extends ", superClassType); if (type.getKind().equals(MutableTypeKind.CLASS)) { pw.print(" implements "); supportedType = true; } else if (type.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(" extends "); supportedType = true; type.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(toPrintableType(superClassType)); i++; type.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(" extends "); pw.print(superClassType);
if (domainReturnType.getKind().equals(MutableTypeKind.CLASS) || domainReturnType.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(prefixDomainParameter(((MutableDeclaredType) remoteServiceTypeElement.toReturnType((DomainDeclared)domainReturnType))).clone()); } else { if (domain.getKind().equals(MutableTypeKind.CLASS) || domain.getKind().equals(MutableTypeKind.INTERFACE)) { pw.print(prefixDomainParameter(((MutableDeclaredType)domain).clone()).stripTypeParametersTypes()); } else {
if (type.getKind().equals(MutableTypeKind.PRIMITIVE) || (javaType != null && unboxType(javaType).getKind().isPrimitive()) || type.equals(processingEnv.getTypeUtils().toMutableType(String.class))) { return types;
if (type.getKind().equals(MutableTypeKind.PRIMITIVE)) { return value.toString();
pw.print(context.getConverter().getConverterBase(), " " + converterName + " = "); Field field = new Field((context.getDomainMethodReturnType().getKind().equals(MutableTypeKind.TYPEVAR) ? "(" + context.getConverter().getDto() + ")" : "") + TransferObjectElementPrinter.DTO_NAME + "." + MethodHelper.toGetter(context.getDtoFieldName()), context.getConverter().getDto()); TransferObjectMappingAccessor transferObjectMappingAccessor = new TransferObjectMappingAccessor(context.getDtoMethod(), processingEnv); pw.print(TransferObjectElementPrinter.RESULT_NAME + "." + MethodHelper.toSetter(domainPathResolver.getPath()) + "("); if (context.getDomainMethodReturnType().getKind().equals(MutableTypeKind.TYPEVAR)) { pw.print("(" + ConverterTypeElement.DOMAIN_TYPE_ARGUMENT_PREFIX + "_" + ((MutableTypeVariable) context.getDomainMethodReturnType()).getVariable().toString() + ")");
if (!type1.getKind().equals(type2.getKind())) { return false;
if (bound != null && (!bound.getKind().isDeclared() || !bound.toString().equals(Object.class.getCanonicalName()))) { boundSize++; if (bound != null && (!bound.getKind().isDeclared() || !bound.toString().equals(Object.class.getCanonicalName()) || acceptObject)) { bounds.add(bound); if (bound != null && (!bound.getKind().isDeclared() || !bound.toString().equals(Object.class.getCanonicalName()))) { boundSize++; if (bound != null && (!bound.getKind().isDeclared() || !bound.toString().equals(Object.class.getCanonicalName()) || acceptObject)) { bounds.add(bound);
private Set<? extends MutableTypeMirror> processBounds(Set<? extends MutableTypeMirror> bounds) { if (bounds.size() > 0) { Set<MutableTypeMirror> newBounds = new HashSet<MutableTypeMirror>(); Iterator<? extends MutableTypeMirror> iterator = bounds.iterator(); while (iterator.hasNext()) { MutableTypeMirror next = iterator.next(); if (next.getKind().isDeclared()) { List<MutableDeclaredType> dataInterfaces = new ArrayList<MutableDeclaredType>(); findDomainData(((MutableDeclaredType)next), dataInterfaces); if (dataInterfaces.size() > 0) { MutableDeclaredType dtoType = (MutableDeclaredType)envContext.getProcessingEnv().getTransferObjectUtils().getDomainType(next).getDto(); DomainDeclaredType domainDeclared = new DataDomainDeclared(dataInterfaces.get(0), dtoType, envContext, null/*, configurationContext*/); domainDeclared.setTypeVariables(new MutableTypeVariable[]{}); if (!hasCustomProperties((MutableDeclaredType) next, dataInterfaces.get(0))) { newBounds.add(domainDeclared); } else { newBounds.add(next); } } else { newBounds.add(next); } } else { newBounds.add(next); } } return newBounds; } return bounds; }
public boolean implementsType(MutableTypeMirror t1, MutableTypeMirror t2) { if (t1 == null || t2 == null || !t1.getKind().isDeclared() || !t2.getKind().isDeclared()) { return false; if (interfaceType.getKind().isDeclared()) { if (((MutableDeclaredType)interfaceType).getCanonicalName().equals(dt2.getCanonicalName())) { return true; if (superClassType != null && superClassType.getKind().isDeclared()) { if (((MutableDeclaredType)superClassType).getCanonicalName().equals(dt2.getCanonicalName())) { return true;
protected MutableTypeMirror toPrintableType(TypeElement owner, MutableTypeMirror mutableType) { if (mutableType.getKind().equals(MutableTypeKind.TYPEVAR)) { MutableTypeVariable mutableTypeVariable = ((MutableTypeVariable)mutableType); if (mutableType.getKind().isDeclared() && ((MutableDeclaredType)mutableType).getTypeVariables().size() > 0) { List<? extends MutableTypeVariable> typeVariables = ((MutableDeclaredType)mutableType).getTypeVariables();