Skip to content

@BindTypeVariables

xcesco edited this page Apr 6, 2018 · 1 revision

When a class has a parent hierarchy with generics, This annotation allows specifying used type variable. For example, suppose you have the following situation:

@BindType
public class TiledMapAnimation extends Parallel2Animation<TranslationFrame, TextureKeyFrame>
{ ... }

public abstract class Parallel2Animation<K0 extends KeyFrame, K1 extends KeyFrame> extends Animation<K0>
{ ... }

If you try to generate bind mapping, an error will be thrown because annotation processor can not determinate parameter type during compilation. To bind TiledMapAnimation you have simply to use @BindTypeVariables in this way:

@BindType
@BindTypeVariables({"K0", "K1"})
public class TiledMapAnimation extends Parallel2Animation<TranslationFrame, TextureKeyFrame>
{ ... }

public abstract class Parallel2Animation<K0 extends KeyFrame, K1 extends KeyFrame> extends Animation<K0>
{ ... }

Table of Contents

Query definition

Features

Relations

Multithread supports

Modularization

Annotations for data convertion

Annotations for SQLite ORM

Annotations for shared preferences

Clone this wiki locally