Skip to content

Create objects with the of() factories (cloudsimplus#612) - #41

Merged
manoelcampos merged 1 commit into
masterfrom
609-factories
Oct 25, 2026
Merged

manoelcampos merged 1 commit into
masterfrom
609-factories

Conversation

@manoelcampos

Copy link
Copy Markdown
Contributor

Updates this project to cloudsimplus/cloudsimplus#612 (issue cloudsimplus/cloudsimplus#609), where the constructors of VmSimple, HostSimple, CloudletSimple, DatacenterSimple, the Network* classes and VmGroup became protected.

Changes

  • new X(...) → X.of(...).
  • The createDatacenter() methods that returned DatacenterSimple now return Datacenter, since DatacenterSimple.of() returns the interface.

All examples compile.

Engineering principles

Principle How it applies
Dependency Inversion Principle (DIP) The code gets the interface types (Vm, Host, Cloudlet, Datacenter) from the factories, instead of depending on the implementation classes.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@manoelcampos manoelcampos self-assigned this Oct 25, 2026
@manoelcampos
manoelcampos merged commit bf96198 into master Oct 25, 2026
1 check passed
@manoelcampos
manoelcampos deleted the 609-factories branch October 25, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant