Package com.google.gxp.compiler.base

Examples of com.google.gxp.compiler.base.Implementable


    // ImplementsVisitor<ImplementsDeclaration> methods:
    public ImplementsDeclaration
    visitUnboundImplementsDeclaration(UnboundImplementsDeclaration uid) {
      TemplateName templateName = uid.getTemplateName();
      Implementable theInterface = serviceDirectory.getImplementable(templateName);

      if (theInterface == null) {
        alertSink.add(new ImplementableNotFoundError(uid, templateName));
        // suppress any other ImplementsDeclaration alerts; return 'null',
        // indicating that this ImplementsDeclaration is invalid
View Full Code Here


    public Void visitBoundImplementsDeclaration(BoundImplementsDeclaration bid) {
      // check for a schema match
      if (!template.getSchema().equals(bid.getImplementable().getSchema())) {
        alertSink.add(new SchemaMismatchError(bid, template.getName().toString()));
      }
      Implementable implementable = bid.getImplementable();

      // check that the number of params match
      // the interface should have one extra param ("this") that the template does not
      if (template.getParameters().size() !=
          implementable.getParameters().size() - 1) {
        alertSink.add(new NumParamsMismatchError(bid,
                                                 implementable.getParameters().size() - 1,
                                                 template.getParameters().size()));
      } else {
        Iterator<FormalParameter> interfaceParams = implementable.getParameters().iterator();
        Iterator<Parameter> templateParams = template.getParameters().iterator();
        while (interfaceParams.hasNext()) {
          FormalParameter interfaceParam = interfaceParams.next();
          if (!Implementable.INSTANCE_PARAM_NAME.equals(interfaceParam.getPrimaryName())) {
            Parameter templateParam = templateParams.next();
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.base.Implementable

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.