Package com.badlogic.gwtref.client

Examples of com.badlogic.gwtref.client.Type


  }

  /** If the type of the field is parameterized, returns the Class object representing the parameter type at the specified index,
   * null otherwise. */
  public Class getElementType (int index) {
    Type elementType = field.getElementType(index);
    return elementType != null ? elementType.getClassOfType() : null;
  }
View Full Code Here


  }

  /** Determines if the class or interface represented by first Class parameter is either the same as, or is a superclass or
   * superinterface of, the class or interface represented by the second Class parameter. */
  static public boolean isAssignableFrom (Class c1, Class c2) {
    Type c1Type = ReflectionCache.getType(c1);
    Type c2Type = ReflectionCache.getType(c2);
    return c1Type.isAssignableFrom(c2Type);
  }
View Full Code Here

    super(initialCapacity);
    this.type = type;
  }

  protected T newObject () {
    Type t = ReflectionCache.getType(type);
    try {
      return (T)t.newInstance();
    } catch (Exception ex) {
      throw new GdxRuntimeException("Unable to create new instance: " + type.getName(), ex);
    }
  }
View Full Code Here

  }

  /** Determines if the class or interface represented by first Class parameter is either the same as, or is a superclass or
   * superinterface of, the class or interface represented by the second Class parameter. */ 
  static public boolean isAssignableFrom (Class c1, Class c2) {
    Type c1Type = ReflectionCache.getType(c1);
    Type c2Type = ReflectionCache.getType(c2);
    return c2Type.isAssignableFrom(c1Type);
  }
View Full Code Here

TOP

Related Classes of com.badlogic.gwtref.client.Type

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.