Package sun.tools.java

Examples of sun.tools.java.Identifier


        ClassDeclaration parentDecl = current.getSuperClass(env);

        while (parentDecl != null) {

            ClassDefinition parentDef = parentDecl.getClassDefinition(env);
            Identifier currentID = parentDecl.getName();

            if ( currentID == idJavaLangObject ) break;

            // Walk all members of this class and update any that
            // already exist in currentMethods...
View Full Code Here


        super(stack,typeCode | TM_PRIMITIVE);

        // Validate type and set names...

        String idlName = IDLNames.getTypeName(typeCode,false);
        Identifier id = null;

        switch (typeCode) {
        case TYPE_VOID:         id = idVoid; break;
        case TYPE_BOOLEAN:      id = idBoolean; break;
        case TYPE_BYTE:         id = idByte; break;
View Full Code Here

    private static boolean isSpecial(sun.tools.java.Type type,
                                     ClassDefinition theClass,
                                     ContextStack stack) {
        if (type.isType(TC_CLASS)) {
            Identifier id = type.getClassName();

            if (id.equals(idRemote)) return true;
            if (id == idJavaIoSerializable) return true;
            if (id == idJavaIoExternalizable) return true;
            if (id == idCorbaObject) return true;
            if (id == idIDLEntity) return true;
            BatchEnvironment env = stack.getEnv();
View Full Code Here

    }

    private boolean initialize(sun.tools.java.Type type, ContextStack stack) {

        int typeCode = TYPE_NONE;
        Identifier id = null;
        String idlName = null;
        String[] idlModuleName = null;
        boolean constant = stack.size() > 0 && stack.getContext().isConstant();

        if (type.isType(TC_CLASS)) {
            id = type.getClassName();

            if (id.equals(idRemote)) {
                typeCode = TYPE_JAVA_RMI_REMOTE;
                idlName = IDL_JAVA_RMI_REMOTE;
                idlModuleName = IDL_JAVA_RMI_MODULE;
            } else if (id == idJavaIoSerializable) {
                typeCode = TYPE_ANY;
                idlName = IDL_SERIALIZABLE;
                idlModuleName = IDL_JAVA_IO_MODULE;
            } else if (id == idJavaIoExternalizable) {
                typeCode = TYPE_ANY;
                idlName = IDL_EXTERNALIZABLE;
                idlModuleName = IDL_JAVA_IO_MODULE;
            } else if (id == idIDLEntity) {
                typeCode = TYPE_ANY;
                idlName = IDL_IDLENTITY;
                idlModuleName = IDL_ORG_OMG_CORBA_PORTABLE_MODULE;
            } else {

                typeCode = TYPE_CORBA_OBJECT;

                // Is it exactly org.omg.CORBA.Object?

                if (id == idCorbaObject) {

                    // Yes, so special case...

                    idlName = IDLNames.getTypeName(typeCode,constant);
                    idlModuleName = null;

                } else {

                    // No, so get the correct names...

                    try {

                        // These can fail if we get case-sensitive name matches...

                        idlName = IDLNames.getClassOrInterfaceName(id,env);
                        idlModuleName = IDLNames.getModuleNames(id,isBoxed(),env);

                    } catch (Exception e) {
                        failedConstraint(7,false,stack,id.toString(),e.getMessage());
                        throw new CompilerError("");
                    }
                }
            }
        }
View Full Code Here

        addClassInUse(unqualifiedName,qualifiedName,packageName);
    }

    void addClassInUse(Type type) {
        if (!type.isPrimitive()) {
            Identifier id = type.getIdentifier();
            String name = IDLNames.replace(id.getName().toString(),". ",".");
            String packageName = type.getPackageName();
            String qualifiedName;
            if (packageName != null) {
                qualifiedName = packageName+"."+name;
            } else {
View Full Code Here

    String getName(Type type) {
        if (type.isPrimitive()) {
            return type.getName() + type.getArrayBrackets();
        }
        Identifier id = type.getIdentifier();
        String name = IDLNames.replace(id.toString(),". ",".");
        return getName(name) + type.getArrayBrackets();
    }
View Full Code Here

        return getName(name) + type.getArrayBrackets();
    }

    // Added for Bug 4818753
    String getExceptionName(Type type) {
        Identifier id = type.getIdentifier();
        return IDLNames.replace(id.toString(),". ",".");
    }
View Full Code Here

        initialize(null,null,null,stack,false);
    }

    private static int getTypeCode(sun.tools.java.Type type, ClassDefinition theClass, ContextStack stack) {
        if (type.isType(TC_CLASS)) {
            Identifier id = type.getClassName();
            if (id == idJavaLangString) return TYPE_STRING;
            if (id == idJavaLangObject) return TYPE_ANY;
        }
        return TYPE_NONE;
    }
View Full Code Here

     * file system), the current user directory is used.
     */
    protected File getFileFor(OutputType outputType, File destinationDir) {
        // Calling this method does some crucial initialization
        // in a subclass implementation. Don't skip it.
        Identifier id = getOutputId(outputType);
        File packageDir = null;
        if(idl){
            packageDir = Util.getOutputDirectoryForIDL(id,destinationDir,env);
        } else {
            packageDir = Util.getOutputDirectoryForStub(id,destinationDir,env);
View Full Code Here

     * @param ot the OutputType for which directory nesting is to be defined.
     * @return the new identifier.
     */
    protected Identifier getOutputId (
                                      OutputType ot ) {
        Identifier id = super.getOutputId( ot );

        Type t = ot.getType();
        String fName = ot.getName();

        if ( id == idJavaLangClass )                 //java.lang.Class and array of
View Full Code Here

TOP

Related Classes of sun.tools.java.Identifier

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.