Package org.codehaus.enunciate.contract.jaxb.adapters

Examples of org.codehaus.enunciate.contract.jaxb.adapters.AdapterType


    return convert(accessorType);
  }

  @Override
  public String convert(TypeDeclaration declaration) throws TemplateModelException {
    AdapterType adapterType = AdapterUtil.findAdapterType(declaration);
    if (adapterType != null) {
      return convert(adapterType.getAdaptingType());
    }
    if (declaration instanceof ClassDeclaration) {
      DecoratedTypeMirror superType = (DecoratedTypeMirror) TypeMirrorDecorator.decorate(((ClassDeclaration) declaration).getSuperclass());
      if (superType != null && superType.isInstanceOf(JAXBElement.class.getName())) {
        //for client conversions, we're going to generalize subclasses of JAXBElement to JAXBElement
View Full Code Here


   *
   * @param declaration The declaration to narrow.
   * @return The narrowed declaration.
   */
  protected ClassDeclaration narrowToAdaptingType(ClassDeclaration declaration) {
    AdapterType adapterType = AdapterUtil.findAdapterType(declaration);
    if (adapterType != null) {
      TypeMirror adaptingType = adapterType.getAdaptingType();
      if (!(adaptingType instanceof ClassType)) {
        return declaration;
      }
      else {
        ClassDeclaration adaptingDeclaration = ((ClassType) adaptingType).getDeclaration();
View Full Code Here

      return null;
    }
    else {
      TYPE_STACK.get().push(declaration.getQualifiedName());
      try {
        AdapterType adapterType = AdapterUtil.findAdapterType(declaration);
        if (adapterType != null) {
          return findMapType(adapterType.getAdaptingType());
        }
        else {
          MapType mapType = null;
          Collection<InterfaceType> superInterfaces = declaredType.getSuperinterfaces();
          for (InterfaceType superInterface : superInterfaces) {
View Full Code Here

  public void visitEnumType(EnumType enumType) {
  }

  public void visitInterfaceType(InterfaceType interfaceType) {
    AdapterType adapterType = AdapterUtil.findAdapterType(interfaceType.getDeclaration());
    if (adapterType == null) {
      //the interface isn't adapted, check for @XmlTransient and if it's there, narrow it to java.lang.Object.
      //see https://jira.codehaus.org/browse/ENUNCIATE-660
      if (interfaceType.getDeclaration() != null && interfaceType.getDeclaration().getAnnotation(XmlTransient.class) != null) {
        AnnotationProcessorEnvironment env = Context.getCurrentEnvironment();
View Full Code Here

  public void visitEnumType(EnumType enumType) {
    visitClassType(enumType);
  }

  public void visitInterfaceType(InterfaceType interfaceType) {
    AdapterType adapterType = AdapterUtil.findAdapterType(interfaceType.getDeclaration());
    if (adapterType != null) {
      adapterType.getAdaptingType().accept(this);
    }
    else {
      MapType mapType = MapTypeUtil.findMapType(interfaceType);
      if (mapType != null) {
        setMapXmlType(mapType);
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.contract.jaxb.adapters.AdapterType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.