Index: /trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java	(revision 12185)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/GpxConstants.java	(revision 12186)
@@ -8,4 +8,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Bounds;
 
 /**
@@ -28,19 +29,78 @@
     String GPX_SRC = "src";
 
+    /**
+     * Prefix used for all meta values.
+     */
     String META_PREFIX = "meta.";
+    /**
+     * A constant for the metadata hash map: the author name of the file
+     * @see GpxData#get(String)
+     */
     String META_AUTHOR_NAME = META_PREFIX + "author.name";
+    /**
+     * A constant for the metadata hash map: the author email of the file
+     * @see GpxData#get(String)
+     */
     String META_AUTHOR_EMAIL = META_PREFIX + "author.email";
+    /**
+     * A constant for the metadata hash map: a link to a page about the author
+     * @see GpxData#get(String)
+     */
     String META_AUTHOR_LINK = META_PREFIX + "author.link";
+    /**
+     * A constant for the metadata hash map: the author field for the copyright information in the gpx file
+     * @see GpxData#get(String)
+     */
     String META_COPYRIGHT_AUTHOR = META_PREFIX + "copyright.author";
+    /**
+     * A constant for the metadata hash map: the license of the file
+     * @see GpxData#get(String)
+     */
     String META_COPYRIGHT_LICENSE = META_PREFIX + "copyright.license";
+    /**
+     * A constant for the metadata hash map: the year of the license for the file
+     * @see GpxData#get(String)
+     */
     String META_COPYRIGHT_YEAR = META_PREFIX + "copyright.year";
+    /**
+     * A constant for the metadata hash map: a description of the file
+     * @see GpxData#get(String)
+     */
     String META_DESC = META_PREFIX + "desc";
+    /**
+     * A constant for the metadata hash map: the keywords of the file
+     * @see GpxData#get(String)
+     */
     String META_KEYWORDS = META_PREFIX + "keywords";
+    /**
+     * A constant for the metadata hash map: the links. They are stored as list of {@link GpxLink} objects
+     * @see GpxData#get(String)
+     */
     String META_LINKS = META_PREFIX + "links";
+    /**
+     * A constant for the metadata hash map: the name of the file (stored in the file, not the one on the disk)
+     * @see GpxData#get(String)
+     */
     String META_NAME = META_PREFIX + "name";
+    /**
+     * A constant for the metadata hash map: the time as string
+     * @see GpxData#get(String)
+     */
     String META_TIME = META_PREFIX + "time";
+    /**
+     * A constant for the metadata hash map: the bounding box. This is a {@link Bounds} object
+     * @see GpxData#getMetaBounds()
+     */
     String META_BOUNDS = META_PREFIX + "bounds";
+    /**
+     * A constant for the metadata hash map: the extension data. This is a {@link Extensions} object
+     * @see GpxData#addExtension(String, String)
+     * @see GpxData#get(String)
+     */
     String META_EXTENSIONS = META_PREFIX + "extensions";
 
+    /**
+     * A namespace for josm GPX extensions
+     */
     String JOSM_EXTENSIONS_NAMESPACE_URI = Main.getXMLBase() + "/gpx-extensions-1.0";
 
Index: /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 12185)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/GpxData.java	(revision 12186)
@@ -34,12 +34,29 @@
 public class GpxData extends WithAttributes implements Data {
 
+    /**
+     * The disk file this layer is stored in, if it is a local layer. May be <code>null</code>.
+     */
     public File storageFile;
+    /**
+     * A boolean flag indicating if the data was read from the OSM server.
+     */
     public boolean fromServer;
 
-    /** Creator (usually software) */
+    /**
+     * Creator metadata for this file (usually software)
+     */
     public String creator;
 
+    /**
+     * A list of tracks this file consists of
+     */
     private final ArrayList<GpxTrack> privateTracks = new ArrayList<>();
+    /**
+     * GXP routes in this file
+     */
     private final ArrayList<GpxRoute> privateRoutes = new ArrayList<>();
+    /**
+     * Addidionaly waypoints for this file.
+     */
     private final ArrayList<WayPoint> privateWaypoints = new ArrayList<>();
     private final GpxTrackChangeListener proxy = e -> fireInvalidate();
Index: /trunk/src/org/openstreetmap/josm/data/gpx/GpxRoute.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/GpxRoute.java	(revision 12185)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/GpxRoute.java	(revision 12186)
@@ -5,5 +5,13 @@
 import java.util.LinkedList;
 
+/**
+ * A route is a part of a GPX file containing of multiple GPX points.
+ */
 public class GpxRoute extends WithAttributes {
+    /**
+     * The points this route consists of. Should not be changed after creation.
+     * <p>
+     * This collection is ordered.
+     */
     public Collection<WayPoint> routePoints = new LinkedList<>();
 
Index: /trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java	(revision 12185)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/ImmutableGpxTrackSegment.java	(revision 12186)
@@ -9,4 +9,7 @@
 import org.openstreetmap.josm.data.Bounds;
 
+/**
+ * A gpx track segment consisting of multiple waypoints, that cannot be changed.
+ */
 public class ImmutableGpxTrackSegment implements GpxTrackSegment {
 
@@ -59,5 +62,5 @@
     @Override
     public Collection<WayPoint> getWayPoints() {
-        return wayPoints;
+        return Collections.unmodifiableList(wayPoints);
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 12185)
+++ /trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java	(revision 12186)
@@ -28,6 +28,16 @@
      */
     public double time;
+    /**
+     * The color to draw the segment before this point in
+     * @see #drawLine
+     */
     public Color customColoring;
+    /**
+     * <code>true</code> indicates that the line before this point should be drawn
+     */
     public boolean drawLine;
+    /**
+     * The direction of the line before this point. Used as cache to speed up drawing. Should not be relied on.
+     */
     public int dir;
 
