When having the folowing code in one file:
@startuml
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml
@startuml
!define SHOW_METHODS
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml
@startuml
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml
I would expect that the resulting first and third image would be identical, but the second and the third resulting image are identical. Looks like the define for SHOW_METHODS is propagated to the third image.