/** * @author Daan van Yperen */ @Fluid(swallowGettersWithParameters = true) public class ParaGetter extends Component { public String custom( String a ) { return a; } }
public void apply(Fluid fluid) { this.swallowGettersWithParameters = fluid.swallowGettersWithParameters(); this.excludeFromGeneration = fluid.exclude(); }
/** Create descriptor for passed type. */ public static ComponentDescriptor create(Class<? extends Component> type, FluidGeneratorPreferences globalPreferences) { String methodPrefix = Strings.decapitalizeString(type.getSimpleName()); String name = type.getSimpleName(); FluidGeneratorPreferences preferences = new FluidGeneratorPreferences(); preferences.mirror(globalPreferences); // @todo make sure this is processed from least to most pressing. for (Annotation annotation : ExtendedTypeReflection.getAllAnnotations(type)) { if (annotation.annotationType().equals(Fluid.class)) { final Fluid fluid = (Fluid) annotation; if (!fluid.name().isEmpty()) { methodPrefix = fluid.name(); name = Strings.capitalizeString(fluid.name()); } preferences.apply(fluid); } } return new ComponentDescriptor(type, methodPrefix, name, preferences ); }
/** Create descriptor for passed type. */ public static ComponentDescriptor create(Class<? extends Component> type, FluidGeneratorPreferences globalPreferences) { String methodPrefix = Strings.decapitalizeString(type.getSimpleName()); String name = type.getSimpleName(); FluidGeneratorPreferences preferences = new FluidGeneratorPreferences(); preferences.mirror(globalPreferences); // @todo make sure this is processed from least to most pressing. for (Annotation annotation : ExtendedTypeReflection.getAllAnnotations(type)) { if (annotation.annotationType().equals(Fluid.class)) { final Fluid fluid = (Fluid) annotation; if (!fluid.name().isEmpty()) { methodPrefix = fluid.name(); name = Strings.capitalizeString(fluid.name()); } preferences.apply(fluid); } } return new ComponentDescriptor(type, methodPrefix, name, preferences ); }
/** * Blueprint for extended component. * * Rich components: * - Are pooled. * - Can mirror state of another component. * * @author Daan van Yperen */ @Fluid(swallowGettersWithParameters = true) public abstract class ExtendedComponent<T extends ExtendedComponent> extends PooledComponent implements Serializable, Mirrorable<T> { }
public void apply(Fluid fluid) { this.swallowGettersWithParameters = fluid.swallowGettersWithParameters(); this.excludeFromGeneration = fluid.exclude(); }
/** * @author Daan van Yperen */ @Fluid(exclude = true) public class Excluded extends Component { }
/** * @author Daan van Yperen */ @Fluid(name = "rename2") public class Rename extends Component { }
/** * Blueprint for extended component. * * Rich components: * - Are pooled. * - Can mirror state of another component. * * @author Daan van Yperen */ @Fluid(swallowGettersWithParameters = true) public abstract class ExtendedComponent<T extends ExtendedComponent> extends PooledComponent implements Serializable, Mirrorable<T> { }
@Fluid(swallowGettersWithParameters = true) public class Physics extends Component implements Serializable {
@Fluid(name = "script") public class Schedule extends PooledComponent {
@Fluid(swallowGettersWithParameters = true) public class Physics extends Component implements Serializable {
@Fluid(name = "script") public class Schedule extends PooledComponent {
@Fluid(swallowGettersWithParameters=true) public class Tint extends ExtendedComponent<Tint> implements Tweenable<Tint> {
@Fluid(swallowGettersWithParameters=true) public class Tint extends ExtendedComponent<Tint> implements Tweenable<Tint> {
@Fluid(swallowGettersWithParameters = true) @Deprecated public class Anim extends Component {
@Fluid(swallowGettersWithParameters = true) @Deprecated public class Anim extends Component {
/** * @author Daan van Yperen */ @Fluid(exclude = true) @Transient public class AnimationAsset extends PooledComponent { public com.badlogic.gdx.graphics.g2d.Animation<TextureRegion> asset; @Override protected void reset() { asset = null; } }
/** * @author Daan van Yperen */ @Fluid(exclude = true) @Transient public class SpriteAsset extends PooledComponent { public Texture asset; @Override protected void reset() { asset = null; } }
/** * @author Daan van Yperen */ @Fluid(exclude = true) @Transient public class AnimationAsset extends PooledComponent { public com.badlogic.gdx.graphics.g2d.Animation<TextureRegion> asset; @Override protected void reset() { asset = null; } }