Package flex2.compiler.mxml.reflect

Examples of flex2.compiler.mxml.reflect.Property


      {
        Class retType = info.getGetterMethod().getReturnType();

        if (VirtualFile.class.isAssignableFrom(retType))
        {
          VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          if (file != null)
          {
            if (info.doChecksum())
              compile_checksum.append(file.getName());
            link_checksum.append(file.getName());
          }
          continue;
        }
        else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
        {
          VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
          for (int j = 0; files != null && j < files.length; j++)
          {
            if (files[j] != null)
            {
              if (info.doChecksum())
                compile_checksum.append(files[j].getName());
              link_checksum.append(files[j].getName());
            }
          }
          continue;
        }
      }

      if (args[i] instanceof Object[])
      {
        Object[] a = (Object[]) args[i];
        for (int j = 0; j < a.length; j++)
        {
          if (info.doChecksum())
            compile_checksum.append(a[j]);
          link_checksum.append(a[j]);
        }
      }
      else if (args[i] instanceof List)
      {
        List l = (List) args[i];
        for (int j = 0; j < l.size(); j++)
        {
          if (info.doChecksum())
            compile_checksum.append(l.get(j));
          link_checksum.append(l.get(j));
        }
      }
      else
      {
        if (info.doChecksum())
          compile_checksum.append(args[i]);
        link_checksum.append(args[i]);
      }
    }

    if (info.getGetterMethod() == null)
    {
      // C: need to make sure that all the VirtualFile-based config values should have getters.
      return;
    }

    Class retType = info.getGetterMethod().getReturnType();

    if (VirtualFile.class.isAssignableFrom(retType))
    {
      VirtualFile file = (VirtualFile) info.getGetterMethod().invoke(targetConfig, (Object[])null);
      if (file != null && !file.isDirectory())
      {
        if (info.doChecksum())
          compile_checksum_ts.append(file.getLastModified());
        link_checksum_ts.append(file.getLastModified());
      }
    }
    else if (retType.isArray() && VirtualFile.class.isAssignableFrom(retType.getComponentType()))
    {
      VirtualFile[] files = (VirtualFile[]) info.getGetterMethod().invoke(targetConfig, (Object[])null);
View Full Code Here


    /**
     * Create virtual file for given file and throw configuration exception if not possible
     */
    public static VirtualFile getVirtualFile(String path, boolean reportError) throws ConfigurationException
    {
        VirtualFile result = null;
        File file = new File(path);

        if (file != null && file.exists())
        {
            try
View Full Code Here

    {
            // No need to check to see if the appPath is supported again.
      if ((appPath != null && files[i].getName().equals(appPath.getName())) || isSupported(files[i]))
      {
        String name = files[i].getName();
        VirtualFile pathRoot = calculatePathRoot(files[i]);
        if (pathRoot != null)
        {
                    String relativePath = calculateRelativePath(name);
                    String namespaceURI = relativePath.replace('/', '.');
                    String localPart = calculateLocalPart(name);
View Full Code Here

        standardDefs.set(defs);
    }

    public static StandardDefs getStandardDefs()
    {
        StandardDefs defs = standardDefs.get();
        if (defs == null)
        {
            defs = StandardDefs.getStandardDefs("halo");
            setStandardDefs(defs);
        }
View Full Code Here

     
      if ((destination != null) && (destinationProperty != null && destinationStyle == null) &&
            !isArrayAccess() && !((isDestinationXMLAttribute || isDestinationXMLNode)))
      {
        Type type = destination.getType();
        Property property = type.getProperty(destinationProperty);
       
        if (property != null && !property.hasPublic())
          result = true;
      }
     
      return result;
    }
View Full Code Here

        boolean result = false;

        if (potentialProperty.indexOf(":") == -1)
        {
            Property property = skeletonClass.getProperty(SymbolTable.publicNamespace, potentialProperty);

            // It looks like we are checking for "public" twice, but
            // the above call also returns properties in the unnamed
            // package, because they are both equivalent to an empty
            // string.
            if ((property != null) && property.hasPublic())
            {
                result = true;
                sourceAsProperty = potentialProperty;

                if (mxmlDocument.showDeprecationWarnings())
View Full Code Here

            {
                Type destinationType = destination.getType();

                if (!destinationType.getName().equals(mxmlDocument.getStandardDefs().CLASS_OBJECTPROXY))
                {
                    Property property = destinationType.getProperty(destinationProperty);

                    if (property != null)
                    {
                        type = property.getType();
                    }
                }
            }
            else if (destinationStyle != null)
            {
View Full Code Here

        {
            return true;
        }
        else if (parentProperty != null || parentType.getDefaultProperty() != null)
        {
            Property property = (parentProperty != null) ? parentType.getProperty(parentProperty) : parentType.getDefaultProperty();
            Style style = (parentProperty != null) ? parentType.getStyle(parentProperty) : null;
           
            if (standardDefs.isItemsComponent(parentType) && (property.getName() == parentType.getDefaultProperty().getName()))
            {
                return true;
            }
           
            if ((property != null) &&
                ((property.getType() == document.getTypeTable().arrayType) ||
                 (property.getType().getElementType() != null)))
            {
                Type propertyElementType = property.getElementType();

                if ((propertyElementType == null) || childType.isAssignableTo(propertyElementType))
                    return true;
            }
            else if (property != null && isStatefulCompatibleType(property.getType()))
            {
                return true;
            }
            else if (style != null && isStatefulCompatibleType(style.getType()))
            {
View Full Code Here

     * Ensures that the instance we are marking state-specific is not a scalar property value.
     */
    private boolean validateStatefulModelType(Model targetModel, Model destination, String parentProperty)
    {
        Type parentType = destination != null ? destination.getType() : document.getRoot().getType();
        Property property = (parentProperty != null) ? parentType.getProperty(parentProperty) : parentType.getDefaultProperty();
        Style style = (parentProperty != null) ? parentType.getStyle(parentProperty) : null;
       
        if (parentType != null && property != null && (standardDefs.isItemsComponent(parentType) &&
            (property.getName() == parentType.getDefaultProperty().getName())))
        {
            return true;
        }
        if (property != null && !isStatefulCompatibleType(property.getType()))
        {
            ThreadLocalToolkit.log(new IncompatibleStatefulNode(), document.getSourcePath(), targetModel.getXmlLineNumber());
            return false;
        }
        else if (style != null && !isStatefulCompatibleType(style.getType()))
View Full Code Here

            {
                String attribName = entry.getKey();
                String attribValue = entry.getValue();
                String thisAttrib = null;

                Property property = type.getProperty(attribName);
                if (property != null)
                {
                    Type propertyType = property.getType();
                    if (propertyType.isAssignableTo(typeTable.stringType)
                        || propertyType == typeTable.objectType
                        || propertyType == typeTable.noType)
                    {
                        thisAttrib = attribName + " = \"" + attribValue + "\"";
View Full Code Here

TOP

Related Classes of flex2.compiler.mxml.reflect.Property

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.