Examples of TypeClass


Examples of com.sun.star.uno.TypeClass

    }

    private static TypeDescription create(Type type)
        throws ClassNotFoundException
    {
        TypeClass typeClass = type.getTypeClass();
        String typeName = type.getTypeName();
        Class zClass = type.getZClass();
        if (zClass == null) {
            throw new ClassNotFoundException("UNO type " + type);
        }
        switch (typeClass.getValue()) {
        case TypeClass.VOID_value:
            return new TypeDescription(
                typeClass, typeName, "[Ljava.lang.Void;", zClass, null, null);

        case TypeClass.BOOLEAN_value:
View Full Code Here

Examples of com.sun.star.uno.TypeClass

        return getElementTypeClass(desc) == TypeClass.INTERFACE;
    }

    private static TypeClass getElementTypeClass(ITypeDescription desc) {
        for (;; desc = desc.getComponentType()) {
            TypeClass tc = desc.getTypeClass();
            if (tc != TypeClass.SEQUENCE) {
                return tc;
            }
        }
    }
View Full Code Here

Examples of com.sun.star.uno.TypeClass

   
    protected static String[] getDisplayValuesofPrimitiveArray(Object _oUnoObject){
    String[] sDisplayValues = null;
    try{
        Type aType = AnyConverter.getType(_oUnoObject);
        TypeClass aTypeClass = aType.getTypeClass();  
        int nTypeValue = aTypeClass.getValue();
        if (nTypeValue == TypeClass.SEQUENCE_value){
            nTypeValue = (sequenceComponentType(aType)).getTypeClass().getValue();
        }
        switch (nTypeValue){
            case TypeClass.BOOLEAN_value:
View Full Code Here

Examples of com.sun.star.uno.TypeClass

                Property[] myProperties = xIntrospectionAccess.getProperties( com.sun.star.beans.PropertyConcept.ALL );
               
                for ( int n = 0; n < myProperties.length; n++ ) {
                    //  get the type of class
                    Type type = myProperties[ n ].Type;
                    TypeClass typeClass = type.getTypeClass();
                   
                    //  get the property set with help of the introspection access
                    XPropertySet xPropertySet = ( XPropertySet ) UnoRuntime.queryInterface( XPropertySet.class, xIntrospectionAccess.queryAdapter( new Type( XPropertySet.class ) ) );
                   
                    if ( xPropertySet != null ) {
View Full Code Here

Examples of com.sun.star.uno.TypeClass

        }
        write16Bit(index);
    }

    public void writeType(TypeDescription type) {
        TypeClass typeClass = type.getTypeClass();
        if (TypeDescription.isTypeClassSimple(typeClass)) {
            write8Bit(typeClass.getValue());
        } else {
            boolean[] found = new boolean[1];
            int index = typeCache.add(found, type.getTypeName());
            write8Bit(typeClass.getValue() | (found[0] ? 0 : 0x80));
            write16Bit(index);
            if (!found[0]) {
                writeStringValue(type.getTypeName());
            }
        }
View Full Code Here

Examples of com.sun.star.uno.TypeClass

  }

  void writeTypeDescrption(ITypeDescription iTypeDescription) {
    if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeTypeDescrption:" + iTypeDescription);

    TypeClass typeClass = iTypeDescription.getTypeClass();

    if(TypeDescription.isTypeClassSimple(typeClass))
      writebyte((byte)typeClass.getValue()); // write the typeclass value

    else {
      boolean found[] = new boolean[1];
      short index;
     
      if(_useCaches)
        index = _typeCache.add(found, iTypeDescription.getTypeName());
      else
        index = (short)0xffff;

      writebyte((byte)(typeClass.getValue() | (found[0] ? 0x0 : 0x80))); // write the typeclass value

      writeshort(index); // write the cache index

      if(!found[0]) // if not found in cache and the type is complex, write the type name
        writeString(iTypeDescription.getTypeName());
View Full Code Here

Examples of com.sun.star.uno.TypeClass

  }

  ITypeDescription readTypeDescription() {
    int typeClassValue = readunsignedbyte() & 0xff;

    TypeClass typeClass = TypeClass.fromInt(typeClassValue & 0x7f);
    ITypeDescription iTypeDescription = null;

    if(TypeDescription.isTypeClassSimple(typeClass)) // is it a simple type?
      iTypeDescription = TypeDescription.getTypeDescription(typeClass);
View Full Code Here

Examples of com.sun.star.uno.TypeClass

      else
        notpassed.addElement(comment + "- getFieldDescriptions - size:" + iFieldDescriptions.length);
      passed = passed && tmp_passed;
     

      TypeClass typeClass = iTypeDescription.getTypeClass();
      tmp_passed = typeClass == names[3];
      passed = passed && tmp_passed;
      if(!tmp_passed)
        notpassed.addElement(comment + "- getTypeClass");
     
View Full Code Here

Examples of org.eclipse.persistence.platform.database.oracle.publisher.sqlrefl.TypeClass

            boolean overloaded = methods.size() > 1;
            dbStoredProcedures = new ArrayList<DbStoredProcedure>();
            for (int j=0; j<methods.size(); j++) { 
                ProcedureMethod m = methods.get(j);
                DbStoredProcedure dbStoredProcedure = null;
                TypeClass returnType = m.getReturnType();
                if (returnType == null) {
                    dbStoredProcedure = new DbStoredProcedure(m.getName());
                }
                else {
                    dbStoredProcedure = new DbStoredFunction(m.getName());
                    DbStoredArgument dbStoredArgument = new DbStoredArgument(returnType.getName());
                    dbStoredArgument.setInOut(RETURN);
                    dbStoredArgument.setSeq(0);
                    dbStoredArgument.setJdbcType(returnType.getJdbcTypecode());
                    Name n = returnType.getNameObject();
                    String typeName;
                    if (n instanceof SqlName) {
                        typeName = ((SqlName)n).getTypeName();
                    }
                    else {
                        typeName = n.getSimpleName();
                    }
                    dbStoredArgument.setJdbcTypeName(typeName);
                    ((DbStoredFunction)dbStoredProcedure).setReturnArg(dbStoredArgument);
                }
                // only set 'overload' on the stored proc if necessary
                if (overloaded) {
                    // start overload indicator at 1
                    dbStoredProcedure.setOverload(j+1);
                }
                dbStoredProcedure.setCatalog(packageName);
                dbStoredProcedure.setSchema(originalSchemaPattern);
                for (int i = 0, l = m.getParamNames().length; i < l; i ++) {
                    String argName = m.getParamNames()[i];
                    TypeClass parameterType = m.getParamTypes()[i];
                    boolean isJDBCType = parameterType.isPrimitive() || parameterType.isObject() ||
                        parameterType.isTable() || parameterType.isArray();
                    DbStoredArgument dbStoredArgument = null;
                    if (isJDBCType) {
                        dbStoredArgument = new DbStoredArgument(argName);
                    }
                    else {
                        dbStoredArgument = new PLSQLStoredArgument(argName);
                    }
                    int mode = m.getParamModes()[i];
                    InOut inOut = IN;
                    if (mode == ProcedureMethod.OUT) {
                        inOut = OUT;
                    }
                    else if (mode == ProcedureMethod.INOUT) {
                        inOut = INOUT;
                    }
                    dbStoredArgument.setInOut(inOut);
                    dbStoredArgument.setSeq(i);
                    dbStoredArgument.setJdbcType(parameterType.getJdbcTypecode());
                    Name n = parameterType.getNameObject();
                    String typeName;
                    if (n instanceof SqlName) {
                        typeName = ((SqlName)n).getTypeName();
                    }
                    else {
View Full Code Here

Examples of org.openquark.cal.compiler.TypeClass

     * Generates the declaration name for a class instance, appropriately hyperlinked if requested.
     * @param classInstance the class instance whose name is to be generated.
     * @param shouldGenerateHyperlinks whether hyperlinks should be generated.
     */
    private void generateClassInstanceDeclarationName(ClassInstance classInstance, boolean shouldGenerateHyperlinks) {
        TypeClass typeClass = classInstance.getTypeClass();
        TypeExpr instanceType = classInstance.getType();
       
        QualifiedName typeClassName = typeClass.getName();      
       
        SourceModel.TypeSignature typeSig = instanceType.toSourceModel(true, ScopedEntityNamingPolicy.FULLY_QUALIFIED);
        SourceModel.TypeExprDefn typeExprDefn = typeSig.getTypeExprDefn();
       
        TypeSignatureHTMLGenerator visitor = new TypeSignatureHTMLGenerator(shouldGenerateHyperlinks);
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.