Examples of TypeRef


Examples of anvil.script.TypeRef

      Name entity,
      Name[] decls,
      boolean withStar)
  {
    LinkNode link = new LinkNode(this, location, entity);
    Import imprt = new Import(null, location, entity, new TypeRef(link), entity.as(), decls, withStar);
    addImport(imprt);
  }
View Full Code Here

Examples of com.sun.xml.bind.v2.model.core.TypeRef

/*      */     private Tree handleElementProp(ElementPropertyInfo<T, C> ep)
/*      */     {
/*  975 */       if (ep.isValueList()) {
/*  976 */         return new Tree.Term(ep) {
/*      */           protected void write(ContentModelContainer parent, boolean isOptional, boolean repeated) {
/*  978 */             TypeRef t = (TypeRef)this.val$ep.getTypes().get(0);
/*  979 */             LocalElement e = parent.element();
/*  980 */             e.block();
/*  981 */             QName tn = t.getTagName();
/*  982 */             e.name(tn.getLocalPart());
/*  983 */             com.sun.xml.bind.v2.schemagen.xmlschema.List lst = e.simpleType().list();
/*  984 */             XmlSchemaGenerator.Namespace.this.writeTypeRef(lst, t, "itemType");
/*  985 */             XmlSchemaGenerator.Namespace.this.elementFormDefault.writeForm(e, tn);
/*  986 */             writeOccurs(e, (isOptional) || (!this.val$ep.isRequired()), repeated);
View Full Code Here

Examples of com.twitter.elephantbird.util.TypeRef

          "Required property " + Constants.SERIALIZATION_CLASS + " is null.");
    }

    try {
      Class thriftClass = job.getClassByName(thriftClassName);
      setInputFormatInstance( new MultiInputFormat(new TypeRef(thriftClass) {}));
    } catch (ClassNotFoundException e) {
      throw new RuntimeException("Failed getting class for " + thriftClassName);
    }
  }
View Full Code Here

Examples of com.volantis.mcs.build.themes.definitions.types.TypeRef

        }else if (name.equals("type")) {
            // Process the children in order to find the keyword definitions.
            processThemePropertyChildren(element);
        } else if (name.equals("typeRef")) {

            TypeRef typeRef = definitionsFactory.createTypeRef();
            typeRef.setReference(element.getText());
            Property property = (Property) findObject(Property.class);
            property.setType(typeRef);

        } else if (name.equals("keywords")) {
View Full Code Here

Examples of etch.compiler.ast.TypeRef

  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() );

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
       
        int i = cn.indexOf( '<' );
        if (i >= 0)
          cn = cn.substring( 0, i );
       
        return String.format( "Validator_custom.get( %s.class, %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
        return String.format( "Validator_custom.get( %s.class, %d, true )",
          n.efqname( this ), type.dim() );

      // Don't allow subclassing for externs or etch defined enums.

      if (!(n.isExtern() || n.isEnumx()))
        Assertion.check( n.isExtern() || n.isEnumx(),
          "n.isExtern() || n.isEnumx(): "+n );

      return String.format( "Validator_custom.get( %s.class, %d, false )",
        n.efqname( this ), type.dim() );
    }

    if (named instanceof Thrown)
    {
      Thrown thrown = (Thrown) named;
View Full Code Here

Examples of etch.compiler.ast.TypeRef

  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()
          + " )";

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
        if (cn.endsWith( "?" ))
          cn = cn.substring( 0, cn.length()-1 );
       
        return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
        return String.format( "Validator_custom.Get( typeof(%s), %d, true )",
          n.efqname( this ), type.dim() );

      // Don't allow subclassing for externs or etch defined enums.

      if (!(n.isExtern() || n.isEnumx()))
        Assertion.check( n.isExtern() || n.isEnumx(),
          "n.isExtern() || n.isEnumx(): "+n );

      return "Validator_custom.Get( typeof ( "
        + n.efqname( this + " ), " + type.dim()
        + ", false )";
    }

    if (named instanceof Thrown)
    {
View Full Code Here

Examples of etch.compiler.ast.TypeRef

  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()+" )";
    }

    if (named instanceof Thrown)
    {
      Thrown thrown = (Thrown) named;
View Full Code Here

Examples of org.apache.etch.compiler.ast.TypeRef

  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()
          + " )";

      Named<?> n = type.getNamed( type.intf() );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
        if (cn.endsWith( "?" ))
          cn = cn.substring( 0, cn.length()-1 );
       
        return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
        return String.format( "Validator_custom.Get( typeof(%s), %d, true )",
          n.efqname( this ), type.dim() );

      // Don't allow subclassing for externs or etch defined enums.

      if (!(n.isExtern() || n.isEnumx()))
        Assertion.check( n.isExtern() || n.isEnumx(),
          "n.isExtern() || n.isEnumx(): "+n );

      return "Validator_custom.Get( typeof ( "
        + n.efqname( this + " ), " + type.dim()
        + ", false )";
    }

    if (named instanceof Thrown)
    {
View Full Code Here

Examples of org.apache.etch.compiler.ast.TypeRef

  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()+" )";
    }

    if (named instanceof Thrown)
    {
      Thrown thrown = (Thrown) named;
View Full Code Here

Examples of org.apache.etch.compiler.ast.TypeRef

  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()
          + " )";

      Named<?> n = type.getNamed( gIntf );

      if (n.isBuiltin())
      {
        Builtin b = (Builtin) n;
        String cn = b.className();
        if (cn.endsWith( "?" ))
          cn = cn.substring( 0, cn.length()-1 );
        return String.format( "Validator_custom.Get( typeof(%s), %d, %s )",
          cn, type.dim(), b.allowSubclass() );
      }

      // Allow subclassing for etch defined structs and externs.

      if (n.isStruct() || n.isExcept())
        return String.format( "Validator_custom.Get( typeof(%s), %d, true )",
          n.efqname( this ), type.dim() );

      // Don't allow subclassing for externs or etch defined enums.

      if (!(n.isExtern() || n.isEnumx()))
        Assertion.check( n.isExtern() || n.isEnumx(),
          "n.isExtern() || n.isEnumx(): "+n );



      return "Validator_custom.Get( typeof ( "
        + n.efqname( this + " ), " + type.dim()
        + ", false )";
    }

    if (named instanceof Thrown)
    {
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.