Examples of ObjectType


Examples of com.google.javascript.rhino.jstype.ObjectType

    @Override public Iterable<JSType> getTypeAlternatives(JSType type) {
      if (type.isUnionType()) {
        return type.toMaybeUnionType().getAlternates();
      } else {
        ObjectType objType = type.toObjectType();
        if (objType != null &&
            objType.getConstructor() != null &&
            objType.getConstructor().isInterface()) {
          List<JSType> list = Lists.newArrayList();
          for (FunctionType impl
                   : registry.getDirectImplementors(objType)) {
            list.add(impl.getInstanceType());
          }
View Full Code Here

Examples of com.google.javascript.rhino.jstype.ObjectType

      }

      // We look up the prototype chain to find the highest place (if any) that
      // this appears.  This will make references to overridden properties look
      // like references to the initial property, so they are renamed alike.
      ObjectType foundType = null;
      ObjectType objType = ObjectType.cast(type);
      if (objType != null && objType.getConstructor() != null
          && objType.getConstructor().isInterface()) {
        ObjectType topInterface = FunctionType.getTopDefiningInterface(
            objType, field);
        if (topInterface != null && topInterface.getConstructor() != null) {
          foundType = topInterface.getConstructor().getPrototype();
        }
      } else {
        while (objType != null && objType.getImplicitPrototype() != objType) {
          if (objType.hasOwnProperty(field)) {
            foundType = objType;
          }
          objType = objType.getImplicitPrototype();
        }
      }

      // If the property does not exist on the referenced type but the original
      // type is an object type, see if any subtype has the property.
      if (foundType == null) {
        ObjectType maybeType = ObjectType.cast(
            registry.getGreatestSubtypeWithProperty(type, field));
        // getGreatestSubtypeWithProperty does not guarantee that the property
        // is defined on the returned type, it just indicates that it might be,
        // so we have to double check.
        if (maybeType != null && maybeType.hasOwnProperty(field)) {
          foundType = maybeType;
        }
      }

      // Unwrap templatized types, they are not unique at runtime.
View Full Code Here

Examples of com.google.javascript.rhino.jstype.ObjectType

      return foundType;
    }

    @Override public JSType getInstanceFromPrototype(JSType type) {
      if (type.isFunctionPrototypeType()) {
        ObjectType prototype = (ObjectType) type;
        FunctionType owner = prototype.getOwnerFunction();
        if (owner.isConstructor() || owner.isInterface()) {
          return prototype.getOwnerFunction().getInstanceType();
        }
      }
      return null;
    }
View Full Code Here

Examples of com.google.javascript.rhino.jstype.ObjectType

    }

    @Override
    public void recordInterfaces(JSType type, JSType relatedType,
                                 DisambiguateProperties<JSType>.Property p) {
      ObjectType objType = ObjectType.cast(type);
      if (objType != null) {
        FunctionType constructor;
        if (objType.isFunctionType()) {
          constructor = objType.toMaybeFunctionType();
        } else if (objType.isFunctionPrototypeType()) {
          constructor = objType.getOwnerFunction();
        } else {
          constructor = objType.getConstructor();
        }
        while (constructor != null) {
          for (ObjectType itype : constructor.getImplementedInterfaces()) {
            JSType top = getTypeWithProperty(p.name, itype);
            if (top != null) {
View Full Code Here

Examples of com.psddev.dari.db.ObjectType

                                page.writeEnd();
                            }
                        page.writeEnd();

                        if (object != null) {
                            ObjectType type = state.getType();

                            page.writeStart("table", "class", "table-striped");
                                page.writeStart("tbody");
                                    if (type != null) {
                                        Class<?> objectClass = type.getObjectClass();

                                        if (objectClass != null) {
                                            page.writeStart("tr");
                                                page.writeStart("th");
                                                    page.writeStart("label", "for", page.createId());
                                                        page.writeHtml("Class");
                                                    page.writeEnd();
                                                page.writeEnd();

                                                page.writeStart("td");
                                                    page.writeJavaClassLink(objectClass);
                                                page.writeEnd();
                                            page.writeEnd();
                                        }
                                    }

                                    page.writeStart("tr");
                                        page.writeStart("th");
                                            page.writeStart("label", "for", page.createId());
                                                page.writeHtml("ID");
                                            page.writeEnd();
                                        page.writeEnd();

                                        page.writeStart("td");
                                            page.writeElement("input",
                                                    "type", "text",
                                                    "id", page.getId(),
                                                    "class", "code",
                                                    "value", state.getId(),
                                                    "readonly", "readonly",
                                                    "style", "width:100%;",
                                                    "onclick", "this.select();");
                                        page.writeEnd();
                                    page.writeEnd();

                                    page.writeStart("tr");
                                        page.writeStart("th");
                                            page.writeStart("label", "for", page.createId());
                                                page.writeHtml("URL");
                                            page.writeEnd();
                                        page.writeEnd();

                                        page.writeStart("td");
                                            page.writeElement("input",
                                                    "type", "text",
                                                    "id", page.getId(),
                                                    "value", JspUtils.getAbsoluteUrl(page.getRequest(), page.cmsUrl("/content/edit.jsp", "id", state.getId())),
                                                    "readonly", "readonly",
                                                    "style", "width:100%;",
                                                    "onclick", "this.select();");
                                        page.writeEnd();
                                    page.writeEnd();
                                page.writeEnd();
                            page.writeEnd();
                        }

                        if (object != null) {
                            ObjectType type = state.getType();

                            if (type != null) {
                                if (!ObjectUtils.isBlank(type.as(Renderer.TypeModification.class).getEmbedPath())) {
                                    String permalink = state.as(Directory.ObjectModification.class).getPermalink();

                                    if (!ObjectUtils.isBlank(permalink)) {
                                        String siteUrl = Application.Static.getInstance(CmsTool.class).getDefaultSiteUrl();
                                        StringBuilder embedCode = new StringBuilder();

                                        embedCode.append("<script type=\"text/javascript\" src=\"");
                                        embedCode.append(StringUtils.addQueryParameters(
                                                StringUtils.removeEnd(siteUrl, "/") + permalink,
                                                "_embed", true,
                                                "_format", "js"));
                                        embedCode.append("\"></script>");

                                        page.writeHtml("Embed Code:");
                                        page.writeElement("br");
                                        page.writeStart("textarea",
                                                "class", "code",
                                                "data-expandable-class", "code",
                                                "readonly", "readonly",
                                                "onclick", "this.select();");
                                            page.writeHtml(embedCode);
                                        page.writeEnd();
                                    }
                                }

                                String defaultPath = type.as(Renderer.TypeModification.class).getPath();
                                Map<String, String> paths = type.as(Renderer.TypeModification.class).getPaths();

                                if (!ObjectUtils.isBlank(defaultPath) || !ObjectUtils.isBlank(paths)) {
                                    page.writeStart("h2");
                                        page.writeHtml("Renderers");
                                    page.writeEnd();

                                    page.writeStart("table", "class", "table-striped");
                                        page.writeStart("tbody");
                                            if (!ObjectUtils.isBlank(defaultPath)) {
                                                page.writeStart("tr");
                                                    page.writeStart("th");
                                                        page.writeStart("code");
                                                            page.writeHtml("Default");
                                                        page.writeEnd();
                                                    page.writeEnd();

                                                    page.writeStart("td");
                                                        page.writeStart("code");
                                                            page.writeStart("a",
                                                                    "target", "_blank",
                                                                    "href", DebugFilter.Static.getServletPath(page.getRequest(), "code",
                                                                            "action", "edit",
                                                                            "type", "JSP",
                                                                            "servletPath", defaultPath));
                                                                page.writeHtml(defaultPath);
                                                            page.writeEnd();
                                                        page.writeEnd();
                                                    page.writeEnd();
                                                page.writeEnd();
                                            }

                                            for (Map.Entry<String, String> entry : paths.entrySet()) {
                                                page.writeStart("tr");
                                                    page.writeStart("th");
                                                        page.writeStart("code");
                                                            page.writeHtml(entry.getKey());
                                                        page.writeEnd();
                                                    page.writeEnd();

                                                    page.writeStart("td");
                                                        page.writeStart("code");
                                                            page.writeStart("a",
                                                                    "target", "_blank",
                                                                    "href", DebugFilter.Static.getServletPath(page.getRequest(), "code",
                                                                            "action", "edit",
                                                                            "type", "JSP",
                                                                            "servletPath", entry.getValue()));
                                                                page.writeHtml(entry.getValue());
                                                            page.writeEnd();
                                                        page.writeEnd();
                                                    page.writeEnd();
                                                page.writeEnd();
                                            }
                                        page.writeEnd();
                                    page.writeEnd();
                                }

                                Class<?> objectClass = type.getObjectClass();

                                if (objectClass != null) {
                                    Static.writeJavaAnnotationDescriptions(page, objectClass);
                                }
                            }
View Full Code Here

Examples of com.sun.appserv.management.config.ObjectType

       
        if (AppClientModuleConfig.J2EE_TYPE.equals(appType))
            return true;
       
        Set configs = AMXUtil.getQueryMgr().queryJ2EETypeNameSet(appType, appName);
        ObjectType appConfig = (ObjectType) configs.iterator().next();
        String objectType = appConfig.getObjectType();
        return (ObjectTypeValues.USER.equalsIgnoreCase(objectType)) ? true: false;
    }
View Full Code Here

Examples of com.sun.org.apache.bcel.internal.generic.ObjectType

      throws GenerationError {
    for(ExceptionHandler ehandler: ilc.exceptionHandlers) {
      InstructionHandle handler_pc = ilc.resolveMark(ehandler.handler) ;
      InstructionHandle start_pc = ilc.resolveMark(ehandler.startRegion) ;
      InstructionHandle end_pc = ilc.resolveMark(ehandler.endRegion) ;
      ObjectType catch_type = new ObjectType(ehandler.exceptionType.toString()) ;
      mgen.addExceptionHandler(start_pc, end_pc, handler_pc, catch_type) ;
    }
  }
View Full Code Here

Examples of com.sun.org.apache.xalan.internal.xsltc.compiler.util.ObjectType

                Object match = _internal2Java.maps(intType, extType);
                if (match != null) {
                    currConstrDistance += ((JavaType)match).distance;
                }
                else if (intType instanceof ObjectType) {
                    ObjectType objectType = (ObjectType)intType;
                    if (objectType.getJavaClass() == extType)
                        continue;
                    else if (extType.isAssignableFrom(objectType.getJavaClass()))
                        currConstrDistance += 1;
                    else {
                        currConstrDistance = Integer.MAX_VALUE;
                        break;
                    }
View Full Code Here

Examples of com.vst.model.ObjectType

        request = newGet("/editObjectType.html");
        request.addParameter("objectTypeId", "1");

        mv = c.handleRequest(request, new MockHttpServletResponse());

        ObjectType objectType = (ObjectType) mv.getModel().get(c.getCommandName());
        assertNotNull(objectType);
        request = newPost("/editObjectType.html");
        super.objectToRequestParameters(objectType, request);

        // update the form's fields and add it back to the request
View Full Code Here

Examples of controllers.CRUD.ObjectType

 
  static final String c1 = "column-1-content";

  public static void save(String id) throws Exception {

    ObjectType type = ObjectType.get(getControllerClass());
    notFoundIfNull(type);
   
    Dashboard dash = (Dashboard) type.findById(id);

    if (params.allSimple().containsKey(c1)
        && !params.allSimple().get(c1).equals("-1")
        && dash.assignments != null) {
      Assignment[] assignments = new Assignment[dash.assignments.size()];
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.