-
Notifications
You must be signed in to change notification settings - Fork 114
@Fluid
Daan van Yperen edited this page Sep 17, 2016
·
3 revisions
Annotation that customizes how the fluid generator processes your component. It will be picked up from superclasses (but not interfaces).
When you have parameterized getters you sometimes want it to chain on the fluid interface, instead of returning the value. You can achieve this by using the @Fluid
annotation.
@Fluid(swallowGettersWithParameters=true)
class Rocket extends Component {
public Rocket copy(Rocket rocket);
}
Will change Rocket E::rocketCopy(Rocket rocket)
into E E::rocketCopy(Rocket rocket)
(it returns E
so you can continue calling methods on E
).
You can change the prefix on your component methods.
@Fluid(name="myRocket")
class Rocket extends Component {
public int size;
}
Will become E(id).myRocket().myRocketSize(10).removeMyRocket()
To exclude a component completely from the fluid interface:
@Fluid(exclude=true)
class NotExposed extends Component {
..
}
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference