protected TypeElement fromMutable(MutableDeclaredType mutableDeclaredType) { return (TypeElement) ((DeclaredType) processingEnv.getTypeUtils().fromMutableType(mutableDeclaredType)).asElement(); }
private void generateMethodAccessors(MutableDeclaredType resultType, FormattedPrintWriter pw, MutableDeclaredType outputType, TypeElement owner, MutableTypeMirror mutableType, List<String> generatedProperties) { TypeElement typeElement = (TypeElement)((DeclaredType) processingEnv.getTypeUtils().fromMutableType(mutableType)).asElement(); generateMethodAccessors(resultType, pw, outputType, owner, typeElement, mutableType instanceof AbstractDataType, generatedProperties); }
public SettingsTypeElement(MutableDeclaredType annotationMutableType, MutableProcessingEnvironment processingEnv) { this.annotationNamedType = toOutputType(annotationMutableType); this.annotationType = (DeclaredType)processingEnv.getTypeUtils().fromMutableType(annotationMutableType); this.processingEnv = processingEnv; }
private Element toElement(MutableDeclaredType type) { Element domainElement = type.asElement(); if (domainElement == null) { TypeMirror fromMutableType = envContext.getProcessingEnv().getTypeUtils().fromMutableType(type); domainElement = ((DeclaredType)fromMutableType).asElement(); } return domainElement; }
private boolean isAbstract(TypeElement dataElement) { DomainDataInterfaceType domainDataInterfaceType = new DomainDataInterfaceType((MutableDeclaredType) processingEnv.getTypeUtils().toMutableType(dataElement.asType()), processingEnv); for (MutableTypeMirror interfaceType: domainDataInterfaceType.getInterfaces()) { if (!(interfaceType instanceof AbstractDataType)) { if (hasAbstractMethod( (TypeElement)((DeclaredType) processingEnv.getTypeUtils().fromMutableType(interfaceType)).asElement())) { return true; } } } return false; }
return fromMutableType(((DelegateMutableDeclaredType)type).ensureDelegateType()); return types.getArrayType(fromMutableType(((MutableArrayType)type).getComponentType())); fromMutableType(((MutableWildcardType)type).getExtendsBound()), fromMutableType(((MutableWildcardType)type).getSuperBound())); return fromMutableType(typeParameter.getUpperBounds().iterator().next()); } else { return fromMutableType(typeParameter.getLowerBounds().iterator().next()); } else { for (MutableTypeVariable typeParameter: mutableDeclaredType.getTypeVariables()) { TypeMirror typeVariable = fromMutableType(typeParameter);
if (unboxType(processingEnv.getTypeUtils().fromMutableType(type)).getKind().isPrimitive()) { return value.toString();
protected MutableTypeMirror castToDomainDataInterface(MutableTypeMirror mutableType) { TypeMirror type = processingEnv.getTypeUtils().fromMutableType(mutableType);
protected MutableTypeMirror getDelegateCast(MutableTypeMirror domainNamedType, boolean stripWildcard) { TypeMirror domainType = processingEnv.getTypeUtils().fromMutableType(domainNamedType); if (domainType == null) { return domainNamedType; } DomainType domainTypeElement = processingEnv.getTransferObjectUtils().getDomainType(domainType); return castToDelegate(domainNamedType, domainTypeElement.getDomainDefinitionConfiguration() == null ? null : domainTypeElement.getDomainDefinitionConfiguration().getDelegateConfigurationTypeElement(), stripWildcard); }
TypeMirror javaType = processingEnv.getTypeUtils().fromMutableType(type);