Programador
Pocket Reference
Dan Pilone
Beijing • Cambridge • Farnham • Köln • Paris • Sebastopol • Taipei • Tokyo
UML 2.0 Pocket Reference
by Dan Pilone Copyright © 2006 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased foreducational, business, or sales promotional use. Online editions are also available for most titles (safari.oreilly.com). For more information, contact our corporate/ institutional sales department: (800) 998-9938 or corporate@oreilly.com.
Editor: Jonathan Gennick Production Editor:
Marlowe Shaeffer
Copyeditor: Rachel Monaghan Proofreader: Loranah Dimant Printing History:
March 2006:
Indexer:Ellen Troutman Zaig Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrators: Robert Romano,
Jessamyn Read, and Lesley Borash
First Edition
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. The Pocket Reference series designations, UML 2.0 Pocket Reference, the image of a baby gorilla, and related tradedress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, thepublisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
0-596-10208-9 [C]
Contents
Introduction Typographic Conventions Acknowledgments UML 2.0 Overview Why UML 2.0? General Modeling Guidelines Static Modeling with UML UML Classifiers Stereotypes Notes Tagged Values Constraints Class Diagrams ClassesAttributes Operations Package Diagrams Visibility of Package Elements Dependencies Between Packages Package Stereotypes Package Tagged Values Merging Packages
1 2 2 3 4 4 6 6 8 14 15 17 19 19 22 34 42 42 44 45 47 47
v
Composite Structures Structures Ports Structured Classes and Properties Collaborations Component Diagrams Components Component Modeling Component Views Deployment DiagramsArtifacts Nodes Node Modeling Specialized Nodes Deployment Specifications Behavioral Diagrams Use Case Diagrams Use Cases Actors Use Case Modeling Use Case Realization Use Case Documents Interaction Diagrams Sequence Diagrams Communication Diagrams Interaction Overview Diagrams Timing Diagrams
47 48 49 52 53 55 55 58 60 61 61 63 64 66 66 68 68 69 69 71 73 75 76 76 87 88 90
vi | ContentsStatechart Diagrams States Actions and Activities Transitions Composite States Concurrent Transitions Protocol State Machines Pseudostates Activity Diagrams Action States Activity Edges Subactivity State Decision and Merge Fork and Join Nodes Partitions Signals The Object Constraint Language (OCL) Basic Syntax Constraints on Operations Constraints on Attributes Conditionals Collections Index
9091 91 93 95 98 98 100 101 101 102 106 107 108 109 110 111 111 113 114 114 115 117
Contents |
vii
Chapter 1
UML 2.0 Pocket Reference
Introduction
Welcome to the UML 2.0 Pocket Reference. This book is written for an audience familiar with object-oriented programming (OOP) and the Unified Modeling Language (UML). It is not intended to teach UML from the ground up. Rather, itprovides a convenient reference for those times when you know there is a way to do something but are unsure of the syntax. This book has been updated and expanded to cover UML 2.0, as defined by the Object Management Group (OMG).
TIP
If you need more than just a reminder about UML syntax, please see UML 2.0 in a Nutshell (O’Reilly).
UML provides a common and simple graphical representation of...
Regístrate para leer el documento completo.