public TypeMirror findAdaptingType(HasClientConvertibleType element) { if (element instanceof Adaptable && ((Adaptable)element).isAdapted()) { return ((Adaptable) element).getAdapterType().getAdaptingType(); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable)element).isAdapted()) { return ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType(); } return null; }
/** * Whether this adapter can adapt the specified type. * * @param type The type. * @return Whether this adapter can adapt the specified type. */ public boolean canAdapt(TypeMirror type, EnunciateContext context) { return context.getProcessingEnvironment().getTypeUtils().isAssignable(type, getAdaptedType()); }
/** * Get the resolved accessor type for this accessor. * * @return the resolved accessor type for this accessor. */ public TypeMirror getResolvedAccessorType() { DecoratedTypeMirror accessorType = getAccessorType(); if (isAdapted()) { accessorType = (DecoratedTypeMirror) getAdapterType().getAdaptingType(accessorType, this.context.getContext()); } return accessorType; }
public TypeMirror findAdaptingType(HasClientConvertibleType element) { if (element instanceof Adaptable && ((Adaptable)element).isAdapted()) { return ((Adaptable) element).getAdapterType().getAdaptingType(); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable)element).isAdapted()) { return ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType(); } return null; } }
public TypeMirror findAdaptingType(TypeElement declaration) { if (this.jacksonContext != null) { AdapterType adapterType = JacksonUtil.findAdapterType(declaration, this.jacksonContext); if (adapterType != null) { return adapterType.getAdaptingType(); } } if (this.jackson1Context != null) { com.webcohesion.enunciate.modules.jackson1.model.adapters.AdapterType otherAdapterType = com.webcohesion.enunciate.modules.jackson1.model.util.JacksonUtil.findAdapterType(declaration, this.jackson1Context); if (otherAdapterType != null) { return otherAdapterType.getAdaptingType(); } } return null; }
/** * Whether this adapter can adapt the specified type. * * @param type The type. * @return Whether this adapter can adapt the specified type. */ public boolean canAdapt(TypeMirror type, EnunciateContext context) { return context.getProcessingEnvironment().getTypeUtils().isAssignable(type, getAdaptedType()); }
public TypeMirror findAdaptingType(HasClientConvertibleType element) { if (element instanceof Adaptable && ((Adaptable)element).isAdapted()) { return ((Adaptable) element).getAdapterType().getAdaptingType(); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable)element).isAdapted()) { return ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType(); } return null; }
/** * Get the resolved accessor type for this accessor. * * @return the resolved accessor type for this accessor. */ public TypeMirror getResolvedAccessorType() { DecoratedTypeMirror accessorType = getAccessorType(); if (isAdapted()) { accessorType = (DecoratedTypeMirror) getAdapterType().getAdaptingType(accessorType, this.context.getContext()); } return accessorType; }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }
public TypeMirror findAdaptingType(TypeElement declaration) { if (this.jacksonContext != null) { AdapterType adapterType = JacksonUtil.findAdapterType(declaration, this.jacksonContext); if (adapterType != null) { return adapterType.getAdaptingType(); } } if (this.jackson1Context != null) { com.webcohesion.enunciate.modules.jackson1.model.adapters.AdapterType otherAdapterType = com.webcohesion.enunciate.modules.jackson1.model.util.JacksonUtil.findAdapterType(declaration, this.jackson1Context); if (otherAdapterType != null) { return otherAdapterType.getAdaptingType(); } } return null; }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }
public TypeMirror findAdaptingType(TypeElement declaration) { if (this.jacksonContext != null) { AdapterType adapterType = JacksonUtil.findAdapterType(declaration, this.jacksonContext); if (adapterType != null) { return adapterType.getAdaptingType(); } } if (this.jackson1Context != null) { com.webcohesion.enunciate.modules.jackson1.model.adapters.AdapterType otherAdapterType = com.webcohesion.enunciate.modules.jackson1.model.util.JacksonUtil.findAdapterType(declaration, this.jackson1Context); if (otherAdapterType != null) { return otherAdapterType.getAdaptingType(); } } return null; }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }
/** * Whether the accessor type is a collection type. * * @return Whether the accessor type is a collection type. */ public boolean isCollectionType() { DecoratedTypeMirror accessorType = getAccessorType(); if (isAdapted()) { accessorType = (DecoratedTypeMirror) getAdapterType().getAdaptingType(accessorType, this.context.getContext()); } return accessorType.isArray() || accessorType.isCollection(); }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }
/** * Whether the accessor type is a collection type. * * @return Whether the accessor type is a collection type. */ public boolean isCollectionType() { DecoratedTypeMirror accessorType = getAccessorType(); if (isAdapted()) { accessorType = (DecoratedTypeMirror) getAdapterType().getAdaptingType(accessorType, this.context.getContext()); } return accessorType.isArray() || accessorType.isCollection(); }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }
@Override public String convert(HasClientConvertibleType element) throws TemplateModelException { if (element instanceof Adaptable && ((Adaptable) element).isAdapted()) { return convert(((Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } if (element instanceof com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable && ((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).isAdapted()) { return convert(((com.webcohesion.enunciate.modules.jackson1.model.adapters.Adaptable) element).getAdapterType().getAdaptingType((DecoratedTypeMirror) element.getClientConvertibleType(), this.context)); } return super.convert(element); }