当前位置: 首页>>代码示例>>Java>>正文


Java IndentingWriter.pO方法代码示例

本文整理汇总了Java中sun.rmi.rmic.IndentingWriter.pO方法的典型用法代码示例。如果您正苦于以下问题:Java IndentingWriter.pO方法的具体用法?Java IndentingWriter.pO怎么用?Java IndentingWriter.pO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.rmi.rmic.IndentingWriter的用法示例。


在下文中一共展示了IndentingWriter.pO方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeImplementation

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write an IDL interface definition for a Java implementation class
 * @param t The current ImplementationType
 * @param p The output stream.
 */
protected void writeImplementation(
                                   ImplementationType t,
                                   IndentingWriter p )
    throws IOException {
    Hashtable inhHash = new Hashtable();
    Hashtable refHash = new Hashtable();
    getInterfaces( t,inhHash );                            //collect interfaces

    writeBanner( t,0,!isException,p );
    writeInheritedIncludes( inhHash,p );
    writeIfndef( t,0,!isException,!isForward,p );
    writeIncOrb( p );
    writeModule1( t,p );
    p.pln();p.pI();
    p.p( "interface " + t.getIDLName() );
    writeInherits( inhHash,!forValuetype,p );

    p.pln( " {" );
    p.pln( "};" );

    p.pO();p.pln();
    writeModule2( t,p );
    writeEpilog( t,refHash,p );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:IDLGenerator.java

示例2: writeForwardReference

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write forward reference for given type
 * @param t Given type
 * @param p The output stream.
 */
protected void writeForwardReference(
                                     Type t,
                                     IndentingWriter p )
    throws IOException {
    String qName = t.getQualifiedName();
    if ( "java.lang.String".equals( qName ) ) ;
    else if ( "org.omg.CORBA.Object".equals( qName ) ) return ;    //no fwd dcl

    writeIfndef( t,0,!isException,isForward,p );
        writeModule1( t,p );
        p.pln();p.pI();
        switch ( t.getTypeCode() ) {
    case TYPE_NC_CLASS:
        case TYPE_NC_INTERFACE: p.p( "abstract valuetype " ); break;
        case TYPE_ABSTRACT:     p.p( "abstract interface " ); break;
        case TYPE_VALUE:        p.p( "valuetype " ); break;
    case TYPE_REMOTE:
    case TYPE_CORBA_OBJECT: p.p( "interface " ); break;
        default: ;                              //all other types were filtered
        }
        p.pln( t.getIDLName() + ";" );
        p.pO();p.pln();
        writeModule2( t,p );
    writeEndif( p );
    }
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:31,代码来源:IDLGenerator.java

示例3: writeException

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write an exception.
 * @param t Given ClassType representing the exception.
 * @param p The output stream.
 */
protected void writeException(
                              ClassType t,
                              IndentingWriter p)
    throws IOException {
    writeBanner( t,0,isException,p );
    writeIfndef( t,0,isException,!isForward,p );
    writeForwardReference( t,p );
    writeModule1( t,p );
    p.pln();p.pI();

    p.pln( "exception " + t.getIDLExceptionName() + " {" );
    p.pln();p.pI();
    p.pln( t.getIDLName() + " value;" );
    p.pO();p.pln();
    p.pln( "};" );

    p.pO();p.pln();
    writeModule2( t,p );
    writeInclude( t,0,!isThrown,p );               //include valuetype idl file
    writeEndif( p );
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:27,代码来源:IDLGenerator.java

示例4: writeNCType

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write an IDL valuetype definition for
 * 1) a nonconforming Java class
 * 2) a nonconforming Java interface (that is not an AbstractType)
 * @param t The current NC Type (NCClassType or NCInterfaceType)
 * @param p The output stream.
 */
protected void writeNCType(
                           CompoundType t,
                           IndentingWriter p )
    throws IOException {
    Vector conVec = getConstants( t );                      //collect constants
    Vector mthVec = getMethods( t );                          //collect methods
    Hashtable inhHash = new Hashtable();
    Hashtable refHash = new Hashtable();
    Hashtable spcHash = new Hashtable();
    Hashtable arrHash = new Hashtable();
    Hashtable excHash = new Hashtable();
    getInterfaces( t,inhHash );                            //collect interfaces
    getInheritance( t,inhHash );                              //add inheritance
    getMethodReferences( mthVec,refHash,spcHash,arrHash,excHash );

    writeProlog( t,refHash,spcHash,arrHash,excHash,inhHash,p );
    writeModule1( t,p );
    p.pln();p.pI();
    p.p( "abstract valuetype " + t.getIDLName() );
    writeInherits( inhHash,!forValuetype,p );

    p.pln( " {" );
    if ( conVec.size() + mthVec.size() > 0 ) {                   //any content?
        p.pln();p.pI();
        for ( int i1 = 0; i1 < conVec.size(); i1++ )            //write constants
            writeConstant( (CompoundType.Member)conVec.elementAt( i1 ),p );
        for ( int i1 = 0; i1 < mthVec.size(); i1++ )              //write methods
            writeMethod( (CompoundType.Method)mthVec.elementAt( i1 ),p );
        p.pO();p.pln();
    }
    p.pln( "};" );

            p.pO();p.pln();
    writeModule2( t,p );
    writeEpilog( t,refHash,p );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:44,代码来源:IDLGenerator.java

示例5: writeJavaIoSerializable

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write a hard-coded IDL typedef definition for the special case
 * java.io.Serializable.
 * @param t The current Type
 * @param p The output stream.
 */
protected void writeJavaIoSerializable(
                                       Type t,
                                       IndentingWriter p )
    throws IOException {
    writeBanner( t,0,!isException,p );
    writeIfndef( t,0,!isException,!isForward,p );
    writeModule1( t,p );
    p.pln();p.pI();
    p.pln( "typedef any Serializable;" );
    p.pO();p.pln();
    writeModule2( t,p );
    writeEndif( p );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:IDLGenerator.java

示例6: writeJavaLangObject

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write a hard-coded IDL typedef definition for the special case
 * java.lang.Object.
 * @param t The current Type
 * @param p The output stream.
 */
protected void writeJavaLangObject(
                                   Type t,
                                   IndentingWriter p )
    throws IOException {
    writeBanner( t,0,!isException,p );
    writeIfndef( t,0,!isException,!isForward,p );
    writeModule1( t,p );
    p.pln();p.pI();
    p.pln( "typedef any _Object;" );
    p.pO();p.pln();
    writeModule2( t,p );
    writeEndif( p );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:IDLGenerator.java

示例7: writeIDLEntity

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write a hard-coded IDL typedef definition for the special case
 * org.omg.CORBA.portable.IDLEntity
 * @param t The current Type
 * @param p The output stream.
 */
protected void writeIDLEntity(
                              Type t,
                              IndentingWriter p )
    throws IOException {
    writeBanner( t,0,!isException,p );
    writeIfndef( t,0,!isException,!isForward,p );
    writeModule1( t,p );
    p.pln();p.pI();
    p.pln( "typedef any IDLEntity;" );
    p.pO();p.pln();
    writeModule2( t,p );
    writeEndif( p );
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:IDLGenerator.java

示例8: writeBoxedIDL

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write valuetype for a boxed IDLEntity.
 * @param t Given CompoundType representing the IDLEntity.
 * @param p The output stream.
 */
protected void writeBoxedIDL(
                             CompoundType t,
                             IndentingWriter p)
    throws IOException {
    String[] boxNames = getIDLModuleNames( t );
    int len = boxNames.length;
    String[] modNames = new String[len - 3];               //remove box modules
    for ( int i1 = 0; i1 < len - 3; i1++ ) modNames[i1] = boxNames[i1 + 3];
    String tName = unEsc( t.getIDLName() );

    writeBanner( t,0,!isException,p );
    writeInclude( t,modNames,tName,p );
    writeIfndef( t,0,!isException,!isForward,p );
    writeModule1( t,p );
    p.pln();p.pI();

    p.p( "valuetype " + tName + " " );
    for ( int i1 = 0; i1 < modNames.length; i1++ )
        p.p( IDL_NAME_SEPARATOR + modNames[i1] );
    p.pln( IDL_NAME_SEPARATOR + tName + ";" );

    p.pO();p.pln();
    writeRepositoryID( t,p );
    p.pln();
    writeModule2( t,p );
    writeEndif( p );
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:IDLGenerator.java

示例9: writeJavaIoExternalizable

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write a hard-coded IDL typedef definition for the special case
 * java.io.Externalizable.
 * @param t The current Type
 * @param p The output stream.
 */
protected void writeJavaIoExternalizable(
                                         Type t,
                                         IndentingWriter p )
    throws IOException {
    writeBanner( t,0,!isException,p );
    writeIfndef( t,0,!isException,!isForward,p );
    writeModule1( t,p );
    p.pln();p.pI();
    p.pln( "typedef any Externalizable;" );
    p.pO();p.pln();
    writeModule2( t,p );
    writeEndif( p );
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:IDLGenerator.java

示例10: writeJavaRmiRemote

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write a hard-coded IDL typedef definition for the special case
 * java.rmi.Remote.
 * @param t The current Type
 * @param p The output stream.
 */
protected void writeJavaRmiRemote(
                                  Type t,
                                  IndentingWriter p )
    throws IOException {
    writeBanner( t,0,!isException,p );
    writeIfndef( t,0,!isException,!isForward,p );
    writeModule1( t,p );
    p.pln();p.pI();
    p.pln( "typedef Object Remote;" );
    p.pO();p.pln();
    writeModule2( t,p );
    writeEndif( p );
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:20,代码来源:IDLGenerator.java

示例11: writeSequence

import sun.rmi.rmic.IndentingWriter; //导入方法依赖的package包/类
/**
 * Write boxedRMI valuetype for a single dimension of an IDL sequence
 * indicated by the given OutputType.
 * The filename for the OutputType is of the form "seqn_elemName" where n
 * is the dimension required.
 * @param ot Given OutputType.
 * @param p The output stream.
 */
protected void writeSequence(
                             OutputType ot,
                             IndentingWriter p)
    throws IOException {
    ArrayType at = (ArrayType)ot.getType();
    Type et = at.getElementType();
    String fName = ot.getName();
    int dim = Integer.parseInt( fName.substring( 3,fName.indexOf( "_" ) ) );
    String idlName = unEsc( et.getIDLName() ).replace( ' ','_' );
    String qIdlName = getQualifiedIDLName( et );
    String qName = et.getQualifiedName();

    String repID = at.getRepositoryID();
    int rix1 = repID.indexOf( '[' );                       //edit repository id
    int rix2 = repID.lastIndexOf( '[' ) + 1;
        StringBuffer rid = new StringBuffer(
                                        repID.substring( 0,rix1 ) +
                                        repID.substring( rix2 ) );
    for ( int i1 = 0; i1 < dim; i1++ ) rid.insert( rix1,'[' );

    String vtName = "seq" + dim + "_" + idlName;
    boolean isFromIDL = false;
    if ( et.isCompound() ) {
        CompoundType ct = (CompoundType)et;
        isFromIDL = ct.isIDLEntity() || ct.isCORBAObject();
    }
    boolean isForwardInclude =
        et.isCompound() &&
        !isSpecialReference( et ) &&
        dim == 1 &&
        !isFromIDL &&
        !"org.omg.CORBA.Object".equals(qName) &&
        !"java.lang.String".equals(qName);

    writeBanner( at,dim,!isException,p );
    if ( dim == 1 && "java.lang.String".equals(qName) )          //special case
        writeIncOrb( p );
    if ( dim == 1 && "org.omg.CORBA.Object".equals(qName) ) ;
    else if ( isSpecialReference( et ) || dim > 1 || isFromIDL )
        writeInclude( at,dim-1,!isThrown,p );               //"trivial" include
    writeIfndef( at,dim,!isException,!isForward,p );
    if ( isForwardInclude )
        writeForwardReference( at,dim-1,p );                    //forward declare
    writeModule1( at,p );
            p.pln();p.pI();
            p.p( "valuetype " + vtName );
            p.p( " sequence<" );
    if ( dim == 1 ) p.p( qIdlName );
            else {
        p.p( "seq" + ( dim - 1 ) + "_"  );
                p.p( idlName );
            }
            p.pln( ">;" );
            p.pO();p.pln();
            p.pln( "#pragma ID " + vtName + " \"" + rid + "\"" );
            p.pln();
    writeModule2( at,p );
    if ( isForwardInclude )
        writeInclude( at,dim-1,!isThrown,p );      //#include for forward declare
            writeEndif( p );
        }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:70,代码来源:IDLGenerator.java


注:本文中的sun.rmi.rmic.IndentingWriter.pO方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。