All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.artemis.annotations.EntityId Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package com.artemis.annotations;

import com.artemis.Entity;
import com.artemis.link.EntityLinkManager;
import com.artemis.utils.Bag;
import com.artemis.utils.IntBag;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 

Marks int and {@link IntBag} fields as holding entity id:s. * Only works on component types. This annotation ensures that: *

    *
  • Entity references can be safely serialized
  • *
  • Tracks inter-entity relationships, if the {@link EntityLinkManager} * is registed with the world.
  • *
* *

Annotation has no effect on {@link Bag}-of-entities and plain {@link Entity} * fields.

* * @see Entity References and Serialization */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface EntityId { }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy