Skip to content

Invalid .puml generated #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iluwatar opened this issue Sep 18, 2016 · 2 comments
Closed

Invalid .puml generated #3

iluwatar opened this issue Sep 18, 2016 · 2 comments

Comments

@iluwatar
Copy link

This is the .puml generated for Builder pattern of
https://github.com/iluwatar/java-design-patterns. The tools http://plantuml.com/plantuml/uml and http://www.planttext.com/planttext seem to fail parsing it.

@startuml
package com.iluwatar.builder {
  class Builder {
    - armor : Armor
    - hairColor : HairColor
    - hairType : HairType
    - name : String
    - profession : Profession
    - weapon : Weapon
    + Builder(profession : Profession, name : String)
    + build() : Hero
    + withArmor(armor : Armor) : Builder
    + withHairColor(hairColor : HairColor) : Builder
    + withHairType(hairType : HairType) : Builder
    + withWeapon(weapon : Weapon) : Builder
  }
  class App {
    + App()
    + main(args : String[]) {static}
  }
  class Hero {
    - armor : Armor
    - hairColor : HairColor
    - hairType : HairType
    - name : String
    - profession : Profession
    - weapon : Weapon
    - Hero(builder : Builder)
    + getArmor() : Armor
    + getHairColor() : HairColor
    + getHairType() : HairType
    + getName() : String
    + getProfession() : Profession
    + getWeapon() : Weapon
    + toString() : String
  }
  enum Weapon {
    + AXE {static}
    + BOW {static}
    + DAGGER {static}
    + SWORD {static}
    + WARHAMMER {static}
    + toString() : String
    + valueOf(name : String) : Weapon {static}
    + values() : Weapon[] {static}
  }
  enum HairColor {
    + BLACK {static}
    + BLOND {static}
    + BROWN {static}
    + RED {static}
    + WHITE {static}
    + toString() : String
    + valueOf(name : String) : HairColor {static}
    + values() : HairColor[] {static}
  }
  enum Profession {
    + MAGE {static}
    + PRIEST {static}
    + THIEF {static}
    + WARRIOR {static}
    + toString() : String
    + valueOf(name : String) : Profession {static}
    + values() : Profession[] {static}
  }
  enum Armor {
    + CHAIN_MAIL {static}
    + CLOTHES {static}
    + LEATHER {static}
    + PLATE_MAIL {static}
    - title : String
    + toString() : String
    + valueOf(name : String) : Armor {static}
    + values() : Armor[] {static}
  }
  enum HairType {
    + BALD {static}
    + CURLY {static}
    + LONG_CURLY {static}
    + LONG_STRAIGHT {static}
    + SHORT {static}
    - title : String
    + toString() : String
    + valueOf(name : String) : HairType {static}
    + values() : HairType[] {static}
  }
}
Hero -->  "-profession" Profession
Builder ..+ Hero
Hero -->  "-armor" Armor
App --+ Hero
Builder -->  "-weapon" Weapon
Builder -->  "-hairColor" HairColor
Builder -->  "-hairType" HairType
Hero -->  "-hairColor" HairColor
Builder -->  "-profession" Profession
Hero -->  "-weapon" Weapon
Hero -->  "-hairType" HairType
Builder -->  "-armor" Armor
@enduml
@markusmo3
Copy link
Owner

@iluwatar it works fine for me on http://plantuml.com/plantuml/uml/:
look here

Could you post the error you are getting here please?

I have noticed that planttext doesnt work though, it seems to not generate proper url for me. Only when skinparam monochrome trueis added after @startuml it works

@iluwatar
Copy link
Author

@markusmo3 now that I try again it works for me too. Probably it was a glitch with the PlantUML online tool. I will close the issue.

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

No branches or pull requests

2 participants