Evo API Draft
  • Java
    • Intro
    • Imports
    • Constructing Objects
    • Properties
    • Type Annotations
    • Conversions
    • Explicit Conversions
    • Behaviors
    • Creating and Extending Types
    • Promises
  • mc-std
    • Intro
    • Commands
Powered by GitBook
On this page
  1. Java

Properties

Demystifying Java properties.

You've seen it.

AnimalManager animalManager = solarSystem.getLifePlanet().getOcean().getAnimalManager();
animalManager.setAnimalLimit(animalManager.getAnimalLimit() + 2);

These type of property patterns are so common in Java that Evo makes them easier.

solarSystem.lifePlanet.ocean.animalManager.animalLimit += 2;

Here are examples of two cases of Evo property mappings.

Getter
Setter
Evo Property

public int getScore()

public void setScore(int score)

score

public bool isHappy()

public void setHappy(bool happy)

happy

PreviousConstructing ObjectsNextType Annotations

Last updated 2 years ago