Examples of TypeTable


Examples of flex2.compiler.mxml.reflect.TypeTable

     */
    public void validate(SymbolTable symbolTable, NameMappings nameMappings,
                         StandardDefs standardDefs, Set<String> themeNames, Set<String> addedCSSFiles)
    {
        Set<String> classNames;
        TypeTable typeTable = (TypeTable) symbolTable.getContext().getAttribute(MxmlCompiler.TYPE_TABLE);

        if (typeTable == null)
        {
            typeTable = new TypeTable(symbolTable, nameMappings, standardDefs, themeNames);
        }

        if (qualifiedTypeSelectors)
        {
            classNames = symbolTable.getClassNames();
        }
        else
        {
            classNames = new HashSet<String>();

            for (String className : symbolTable.getClassNames())
            {
                if (qualifiedTypeSelectors)
                    classNames.add(NameFormatter.toDot(className));
                else
                    classNames.add(className.replaceFirst(".*:", ""));
            }
        }

        // Strip off the leading '[' and trailing ']'.
        String themeNamesString = themeNames.toString();
        themeNamesString = themeNamesString.substring(1, themeNamesString.length() - 1);

        for (Entry<String, StyleDef> entry : styleDefs.entrySet())
        {
            String styleName = entry.getKey();
            StyleDef styleDef = entry.getValue();
            String typeName = StyleDef.dehyphenize(styleName);

            Map<String, StyleDeclaration> declarations = styleDef.getDeclarations();

            if (declarations != null)
            {
                for (StyleDeclaration styleDeclaration : declarations.values())
                {
                    Collection<StyleDeclarationBlock> blocks = styleDeclaration.getDeclarationBlocks();
                    for (StyleDeclarationBlock block : blocks)
                    {
                        Map<String, StyleProperty> styleProperties = block.getProperties();
   
                        if (addedCSSFiles == null || addedCSSFiles.contains(styleDeclaration.getPath()))
                        {
                            if (styleDef.isTypeSelector())
                            {
                                if (qualifiedTypeSelectors && mxmlConfiguration.showInvalidCssPropertyWarnings())
                                {
                                    Type type = typeTable.getType(NameFormatter.toColon(typeName));
   
                                    if (type != null)
                                    {
                                        validateTypeSelectorProperties(styleProperties, type, styleDef,
                                                                       typeName, themeNamesString);
                                    }
                                }
                            }
   
                            if (mxmlDocumentQName != null)
                            {
                                // Don't use getType(QName), because that
                                // tries to lookup the class name in the
                                // manifest.  Use getType(String) instead.
                                Type mxmlDocumentType = typeTable.getType(mxmlDocumentQName.toString());
                                assert mxmlDocumentType != null;
                                validatePropertyReferences(styleProperties, mxmlDocumentType);
                            }
                        }
                    }
View Full Code Here

Examples of flex2.compiler.mxml.reflect.TypeTable

  public CompilationUnit parse1(Source source, SymbolTable symbolTable)
  {
        CompilationUnit unit = source.getCompilationUnit();

      // use TypeTable to do the encapsulation - SymbolTable can be too low-level for MXML...
    TypeTable typeTable = (TypeTable) symbolTable.getContext().getAttribute(MxmlCompiler.TYPE_TABLE);
    if (typeTable == null)
    {
      typeTable = new TypeTable(symbolTable, nameMappings, unit.getStandardDefs(),
                                      mxmlConfiguration.getThemeNames());
      symbolTable.getContext().setAttribute(MxmlCompiler.TYPE_TABLE, typeTable);
    }

    /**
 
View Full Code Here

Examples of flex2.compiler.mxml.reflect.TypeTable

  protected String formatExpr(Type targetType, Object value)
  {
    assert targetType != null;
    assert value != null;

    TypeTable typeTable = getTypeTable();

    if (value instanceof BindingExpression)
    {
      if (targetType.equals(typeTable.booleanType) ||
        targetType.equals(typeTable.numberType) ||
View Full Code Here

Examples of flex2.compiler.mxml.reflect.TypeTable

                              boolean generateDocComments, Type targetType, Object value)
  {
    assert targetType != null;
    assert value != null;

    TypeTable typeTable = getTypeTable();

    if (value instanceof BindingExpression)
    {
      if (targetType.equals(typeTable.booleanType) ||
        targetType.equals(typeTable.numberType) ||
View Full Code Here

Examples of flex2.compiler.mxml.reflect.TypeTable

   *     rvalue must be a singleton, and rvalue type must be a subtype of lvalue type (ok)
   * </pre>
   */
  public static int check(Type lvalueType, Type lvalueElementType, Type rvalueType, boolean rvalueIsSingleton, StandardDefs standardDefs)
  {
    TypeTable typeTable = lvalueType.getTypeTable();
    //  assert typeTable == rvalueType.getTypeTable();

    if (typeTable.arrayType.equals(lvalueType))
    {
      if (rvalueIsSingleton)
View Full Code Here

Examples of flex2.compiler.mxml.reflect.TypeTable

     */
    public void validate(SymbolTable symbolTable, NameMappings nameMappings,
                         StandardDefs standardDefs, Set<String> themeNames, Set<String> addedCSSFiles)
    {
        Set<String> classNames;
        TypeTable typeTable = (TypeTable) symbolTable.getContext().getAttribute(MxmlCompiler.TYPE_TABLE);

        if (typeTable == null)
        {
            typeTable = new TypeTable(symbolTable, nameMappings, standardDefs, themeNames);
        }

        if (qualifiedTypeSelectors)
        {
            classNames = symbolTable.getClassNames();
        }
        else
        {
            classNames = new HashSet<String>();

            for (String className : symbolTable.getClassNames())
            {
                if (qualifiedTypeSelectors)
                    classNames.add(NameFormatter.toDot(className));
                else
                    classNames.add(className.replaceFirst(".*:", ""));
            }
        }

        // Strip off the leading '[' and trailing ']'.
        String themeNamesString = themeNames.toString();
        themeNamesString = themeNamesString.substring(1, themeNamesString.length() - 1);

        for (Entry<String, StyleDef> entry : styleDefs.entrySet())
        {
            String styleName = entry.getKey();
            StyleDef styleDef = entry.getValue();
            String typeName = StyleDef.dehyphenize(styleName);

            Map<String, StyleDeclaration> declarations = styleDef.getDeclarations();

            if (declarations != null)
            {
                for (StyleDeclaration styleDeclaration : declarations.values())
                {
                    Collection<StyleDeclarationBlock> blocks = styleDeclaration.getDeclarationBlocks();
                    for (StyleDeclarationBlock block : blocks)
                    {
                        Map<String, StyleProperty> styleProperties = block.getProperties();
   
                        if (addedCSSFiles == null || addedCSSFiles.contains(styleDeclaration.getPath()))
                        {
                            if (styleDef.isTypeSelector())
                            {
                                if (qualifiedTypeSelectors && mxmlConfiguration.showInvalidCssPropertyWarnings())
                                {
                                    Type type = typeTable.getType(NameFormatter.toColon(typeName));
   
                                    if (type != null)
                                    {
                                        validateTypeSelectorProperties(styleProperties, type, styleDef,
                                                                       typeName, themeNamesString);
                                    }
                                }
                            }
   
                            if (mxmlDocumentQName != null)
                            {
                                // Don't use getType(QName), because that
                                // tries to lookup the class name in the
                                // manifest.  Use getType(String) instead.
                                Type mxmlDocumentType = typeTable.getType(mxmlDocumentQName.toString());
                                assert mxmlDocumentType != null;
                                validatePropertyReferences(styleProperties, mxmlDocumentType);
                            }
                        }
                    }
View Full Code Here

Examples of org.apache.axis2.description.java2wsdl.TypeTable

        if (axisService.isCustomWsdl()) {
            OMElement package2QName = createOMElement(fac, ns,
                                                      DeploymentConstants.TAG_PACKAGE2QNAME);
            serviceEle.addChild(package2QName);
            TypeTable typeTable = axisService.getTypeTable();
            if (typeTable != null) {
                Map complexSchemaMap = typeTable.getComplexSchemaMap();
                Set complexSchemaSet = complexSchemaMap.entrySet();
                for (Iterator iterator = complexSchemaSet.iterator(); iterator.hasNext();) {
                    Map.Entry me = (Map.Entry) iterator.next();
                    String packageKey = (String) me.getKey();
                    QName qName = (QName) me.getValue();
View Full Code Here

Examples of org.apache.axis2.description.java2wsdl.TypeTable

                OMAttribute omAttribute = omElement.getAttribute(new QName("http://www.w3.org/2001/XMLSchema-instance", "type"));
                if (omAttribute != null) {
                    String value = omAttribute.getAttributeValue();
                    if (value != null && !value.trim().equals("")) {
                        String[] strings = value.split(":");
                        TypeTable table = new TypeTable();
                        QName qName = table.getQNamefortheType(strings[1]);
                        return createParam(omElement, qName, engine);
                    }
                }
                return omElement.getText();
            } else {
View Full Code Here

Examples of org.apache.axis2.description.java2wsdl.TypeTable

            child.addChild(fac.createOMText(child, enumValue.getValueAsString()));
        }
    }

    private static OMNamespace getNameSpaceForType(SOAPFactory fac, AxisService service, CompositeDataType dataType) {
        TypeTable typeTable = service.getTypeTable();
        String fullname = (dataType.getModule()!=null) ? dataType.getModule() + dataType.getName() : dataType.getName();
        fullname = fullname.replaceAll(CompositeDataType.MODULE_SEPERATOR, ".");
        QName qname = typeTable.getQNamefortheType(fullname);
        if (qname==null)
            return null;
        return fac.createOMNamespace(qname.getNamespaceURI(), qname.getPrefix());
    }
View Full Code Here

Examples of org.apache.axis2.description.java2wsdl.TypeTable

        }

        Interface intf = (Interface) idl.getInterfaces().get(interfaceName);
        Operation[] operations = intf.getOperations();

        TypeTable table = schemaGenerator.getTypeTable();
        PhasesInfo pinfo = axisConfig.getPhasesInfo();

        for (int i = 0; i < operations.length; i++) {
            Operation corbaOperation = operations[i];
            String opName = corbaOperation.getName();
            if (excludeOperations != null && excludeOperations.contains(opName)) {
                continue;
            }
            AxisOperation operation = axisService.getOperation(new QName(opName));
            // if the operation there in services.xml then try to set it schema element name
            if (operation != null) {
                AxisMessage inMessage = operation.getMessage(
                        WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                if (inMessage != null) {
                    inMessage.setName(opName + Java2WSDLConstants.MESSAGE_SUFFIX);
                    QName complexSchemaType = table.getComplexSchemaType(opName);
                    inMessage.setElementQName(complexSchemaType);
                    if (complexSchemaType != null) {
                        axisService.addMessageElementQNameToOperationMapping(complexSchemaType,
                                operation);
                    }
                }
                DataType returnType = corbaOperation.getReturnType();
                if (returnType != null && !CorbaUtil.getQualifiedName(returnType).equals(VOID)) {
                    AxisMessage outMessage = operation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
                    QName qNamefortheType = table.getQNamefortheType(opName + RESPONSE);
                    outMessage.setElementQName(qNamefortheType);
                    if (qNamefortheType != null) {
                        axisService.addMessageElementQNameToOperationMapping(qNamefortheType, operation);
                    }
                    outMessage.setName(opName + RESPONSE);
                }
                if (corbaOperation.hasRaises()) {
                    List extypes = corbaOperation.getRaises();
                    for (int j = 0; j < extypes.size(); j++) {
                        AxisMessage faultMessage = new AxisMessage();
                        ExceptionType extype = (ExceptionType) extypes.get(j);
                        String exname = extype.getName() ;
                        if(extypes.size()>1){
                            faultMessage.setName(opName + FAULT + j);
                        } else{
                            faultMessage.setName(opName + FAULT);
                        }
                        faultMessage.setElementQName(
                                table.getComplexSchemaType(exname + FAULT));
                        operation.setFaultMessages(faultMessage);
                    }

                }
            } else {
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.