@Override public <A extends Annotation> A getAnnotation(Class<A> annotationType) { return ensureDelegateType().getAnnotation(annotationType); }
@Override protected MutableDeclaredType getDelegate() { MutableDeclaredType delegate = super.getDelegate(); if (mutableDeclaredType.getAnnotation(DomainInterface.class) == null) { delegate.setSuperClass(null); } return delegate; }
@Override protected boolean checkPreconditions(ProcessorContext context, boolean alreadyExists) { if (alreadyExists) { return false; } DataAccessObject daoAnnotation = context.getMutableType().getAnnotation(DataAccessObject.class); if (daoAnnotation == null) { return false; } return daoAnnotation.provider().equals(Provider.INTERFACE); }
protected MutableDeclaredType getDataType(MutableDeclaredType inputType) { if (inputType.getTypeVariables().size() > 0) { MutableTypeVariable[] typeVariables = new MutableTypeVariable[inputType.getTypeVariables().size()]; for (int i = 0; i < inputType.getTypeVariables().size(); i++) { typeVariables[i] = processingEnv.getTypeUtils().getTypeVariable(MutableWildcardType.WILDCARD_NAME); } inputType = inputType.clone().setTypeVariables(typeVariables); } if (inputType.getAnnotation(DomainInterface.class) != null) { return new DomainDataInterfaceType(inputType, processingEnv); } return inputType; }
public void findDomainData(MutableDeclaredType declaredType, List<MutableDeclaredType> domainDataTypes) { if (declaredType.getAnnotation(DomainData.class) != null) { domainDataTypes.add(declaredType); } //We need to iterate over interfaces firstly - for cases that some data interfaces will be in hierarchy we have //to find most specified data interface for (MutableTypeMirror interfaces : declaredType.getInterfaces()) { findDomainData((MutableDeclaredType)interfaces, domainDataTypes); } MutableDeclaredType superClass; if (declaredType instanceof DelegateMutableDeclaredType) { superClass = ((DelegateMutableDeclaredType)declaredType).ensureDelegateType().getSuperClass(); } else { superClass = declaredType.getSuperClass(); } if (superClass != null) { findDomainData(superClass, domainDataTypes); } }
if (!ListUtils.containsElement(processingElements, typeElement) && mutableType.getAnnotation(ProcessorConfiguration.class) == null && isSupportedKind(typeElement.getKind())) { processingElements.add(mutableType);
if (beanWrapperResultTypeElement == null && mutableReturnType.getAnnotation(BeanWrapper.class) == null) { processingEnv.getMessager().printMessage(Kind.WARNING, "Falling back to non-beanwrapper primitive type - didn't find = " + beanWrapperResultType.getCanonicalName()); generateGetterForPrimitive(pw, method, owner);