Examples of narrow()


Examples of com.sun.codemodel.JClass.narrow()

          return list.narrow(clazz);
        } else if (jFieldVar.fullName().startsWith("java.util.Arrayist")) {
          JClass arrayList = cm.ref(ArrayList.class);
          LOG.info(">>>>>>> change " + jFieldVar.name() + " -> " + arrayList.narrow(clazz).name() );
          //jFieldVar.type(arrayList.narrow(clazz));
          return arrayList.narrow(clazz);
        } else {
          LOG.info(">>>>>>> change " + jFieldVar.name() + " -> " + clazz.name());
          //jFieldVar.type(clazz);
          return clazz;
        }
View Full Code Here

Examples of com.sun.codemodel.JClass.narrow()

  @Nonnull
  @Override
  public JClass generateFieldType( @Nonnull FieldDeclarationInfo fieldInfo ) {
    JClass collectionType = codeGenerator.ref( fieldInfo.getCollectionParam().toString() );
    JClass list = codeGenerator.getModel().ref( List.class );
    return list.narrow( collectionType.wildcard() );
  }

  @Override
  public boolean canHandle( @Nonnull FieldDeclarationInfo fieldInfo ) {
    return fieldInfo.isCollectionType();
View Full Code Here

Examples of com.sun.codemodel.JClass.narrow()

  @NotNull
  @Override
  public JClass generateFieldType( @NotNull FieldDeclarationInfo fieldInfo ) {
    JClass collectionType = codeGenerator.ref( fieldInfo.getCollectionParam().toString() );
    JClass list = codeGenerator.getModel().ref( List.class );
    return list.narrow( collectionType.wildcard() );
  }

  @Override
  public boolean canHandle( @NotNull FieldDeclarationInfo fieldInfo ) {
    return fieldInfo.isCollectionType();
View Full Code Here

Examples of com.sun.codemodel.JClass.narrow()

    if ( TypeUtils.isCollectionType( type ) ) {
      TypeMirror collectionParam = TypeUtils.getCollectionParam( type );
      JClass collection = codeGenerator.ref( TypeUtils.getErasure( type ) );

      if ( collectionParam instanceof WildcardType ) {
        return collection.narrow( codeGenerator.ref( getJaxbTypeName( TypeUtils.getErasure( collectionParam ), stub ) ).wildcard() );
      } else {
        return collection.narrow( codeGenerator.ref( getJaxbTypeName( collectionParam, stub ) ) );
      }
    }
View Full Code Here

Examples of com.sun.codemodel.JClass.narrow()

      JClass collection = codeGenerator.ref( TypeUtils.getErasure( type ) );

      if ( collectionParam instanceof WildcardType ) {
        return collection.narrow( codeGenerator.ref( getJaxbTypeName( TypeUtils.getErasure( collectionParam ), stub ) ).wildcard() );
      } else {
        return collection.narrow( codeGenerator.ref( getJaxbTypeName( collectionParam, stub ) ) );
      }
    }

    return codeGenerator.ref( getJaxbTypeName( type, stub ) );
  }
View Full Code Here

Examples of com.sun.codemodel.JClass.narrow()

  @Nonnull
  @Override
  public JClass generateFieldType( @Nonnull FieldDeclarationInfo fieldInfo ) {
    JClass collectionType = codeGenerator.ref( fieldInfo.getCollectionParam().toString() );
    JClass list = codeGenerator.getModel().ref( List.class );
    return list.narrow( collectionType.wildcard() );
  }

  @Override
  public boolean canHandle( @Nonnull FieldDeclarationInfo fieldInfo ) {
    return fieldInfo.isCollectionType();
View Full Code Here

Examples of com.sun.codemodel.JClass.narrow()

  @Nonnull
  @Override
  public JClass generateFieldType( @Nonnull FieldDeclarationInfo fieldInfo ) {
    JClass collectionType = codeGenerator.ref( fieldInfo.getCollectionParam().toString() );
    JClass list = codeGenerator.getModel().ref( List.class );
    return list.narrow( collectionType.wildcard() );
  }

  @Override
  public boolean canHandle( @Nonnull FieldDeclarationInfo fieldInfo ) {
    return fieldInfo.isCollectionType();
View Full Code Here

Examples of com.sun.codemodel.JClass.narrow()

  @NotNull
  @Override
  public JClass generateFieldType( @NotNull FieldDeclarationInfo fieldInfo ) {
    JClass collectionType = codeGenerator.ref( fieldInfo.getCollectionParam().toString() );
    JClass list = codeGenerator.getModel().ref( List.class );
    return list.narrow( collectionType.wildcard() );
  }

  @Override
  public boolean canHandle( @NotNull FieldDeclarationInfo fieldInfo ) {
    return fieldInfo.isCollectionType();
View Full Code Here

Examples of com.sun.codemodel.internal.JClass.narrow()

    public JClass toType(Outline o, Aspect aspect) {
        JClass r = rawType.toType(o,aspect);

        for( NType arg : args )
            r = r.narrow(arg.toType(o,aspect).boxify());

        return r;
    }

    public boolean isAbstract() {
View Full Code Here

Examples of org.activeio.SyncChannel.narrow()

    }
   
    private static RequestChannel createRequestChannel(URI target) throws IOException, URISyntaxException {
        SocketSyncChannelFactory factory = new SocketSyncChannelFactory();
        SyncChannel channel = factory.openSyncChannel(target);
        SocketMetadata socket = (SocketMetadata) channel.narrow(SocketMetadata.class);
        socket.setTcpNoDelay(true);
        return new AsyncChannelToClientRequestChannel(
                 new PacketAggregatingSyncChannel(
                       channel));       
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.