Package org.apache.etch.compiler.ast

Examples of org.apache.etch.compiler.ast.Parameter.type()


  public String getValidator( Named<?> named )
  {
    if (named instanceof Parameter)
    {
      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return "Validator_" + type.type() + ".Get( " + type.dim()
          + " )";
View Full Code Here


    int n = argList.size();
    for (int i = 0; i < n; i++)
    {
      Parameter param = authParams.get( i );
      AuthArg aarg = argList.get( i );
      aarg.setType( param.type() );
      Token arg = aarg.value();
     
//      System.out.printf( "auth method %s param %s = %s\n",
//        method, param.name(), arg );
     
View Full Code Here

    Parameter p = msg.getParameter( arg.image );
    if (p != null)
    {
      // it's a parameter, do the types match?
     
      Named<?> pt = p.type().getNamed( msg.parent() );
      Named<?> paramType = param.type().getNamed( msg.parent() );
      if (pt == paramType)
        return;
     
      throw typeMismatch( param, arg, argNo );
View Full Code Here

      if (p == null)
        throw new ParseException( String.format(
          "Authorize method %s arg %d name does not resolve to a field (%s) at line %d",
          method.image, argNo+1, arg, lineno() ) );
     
      Named<?> pt = p.type().getNamed( service );
      Named<?> paramType = param.type().getNamed( service );
      if (pt == paramType)
        return;

      throw typeMismatch( param, arg, argNo );
View Full Code Here

  public String getValidator( Named<?> named )
  {
    if (named instanceof Parameter)
    {
      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return "Validator_"+type.type()+".get( "+type.dim()+" )";

      return "Validator_custom.getCustom( "+type.getNamed( type.intf() ).efqname( this )+".class, "+type.dim()+" )";
View Full Code Here

  public String getValidator( Named<?> named )
  {
    if (named instanceof Parameter)
    {
      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return "Validator_" + type.type() + ".Get( " + type.dim()
          + " )";
View Full Code Here

  }

  public String getValidator(Service service, Named<?> named) {
    if (named instanceof Parameter) {
      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return String.format("(etch_object*)etchvtor_%s_get( %d )", getValidatorStringForParam(param),
            type.dim());

View Full Code Here

  public String getValidator( Named<?> named )
  {
    if (named instanceof Parameter)
    {
      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return String.format( "Validator_%s.get( %d )",
          type.type(), type.dim() );
View Full Code Here

  public String getValidator( Named<?> named )
  {
    if (named instanceof Parameter)
    {
      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return String.format( "Validator_%s.get( %d )",
          type.type(), type.dim() );
View Full Code Here

  @Override
  public String getValidator(Named<?> named) {
    if (named instanceof Parameter) {
      Parameter param = (Parameter) named;
      TypeRef type = param.type();

      if (type.isBuiltin())
        return String.format("EtchValidator%s::Get(runtime, %d, tmpValue)",
            this.getValidatorStringForParam(param), type.dim());
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.