Add some nullability annotations.

上级 b02c2014
......@@ -13,6 +13,7 @@ namespace CesiumLanguageWriter.Advanced
/// <summary>
/// The maximum interval of time that can be specified.
/// </summary>
[NotNull]
public static readonly TimeInterval MaximumInterval = new TimeInterval(GregorianDate.MinValue.ToJulianDate(), GregorianDate.MaxValue.ToJulianDate());
private static Iso8601Format GetIso8601Format(CesiumOutputStream output)
......
......@@ -18,31 +18,44 @@ namespace CesiumLanguageWriter
/// <summary>
/// The name of the <c>unitCartesian</c> property.
/// </summary>
[NotNull]
public const string UnitCartesianPropertyName = "unitCartesian";
/// <summary>
/// The name of the <c>unitSpherical</c> property.
/// </summary>
[NotNull]
public const string UnitSphericalPropertyName = "unitSpherical";
/// <summary>
/// The name of the <c>reference</c> property.
/// </summary>
[NotNull]
public const string ReferencePropertyName = "reference";
/// <summary>
/// The name of the <c>velocityReference</c> property.
/// </summary>
[NotNull]
public const string VelocityReferencePropertyName = "velocityReference";
/// <summary>
/// The name of the <c>delete</c> property.
/// </summary>
[NotNull]
public const string DeletePropertyName = "delete";
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumUnitCartesian3ValuePropertyAdaptor<AlignedAxisCesiumWriter>> m_asUnitCartesian;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumUnitSphericalValuePropertyAdaptor<AlignedAxisCesiumWriter>> m_asUnitSpherical;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter>> m_asReference;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumVelocityReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter>> m_asVelocityReference;
/// <summary>
......@@ -265,16 +278,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumUnitCartesian3ValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumUnitCartesian3ValuePropertyAdaptor<AlignedAxisCesiumWriter> AsUnitCartesian()
{
return m_asUnitCartesian.Value;
}
[NotNull]
private Lazy<CesiumUnitCartesian3ValuePropertyAdaptor<AlignedAxisCesiumWriter>> CreateAsUnitCartesian()
{
return new Lazy<CesiumUnitCartesian3ValuePropertyAdaptor<AlignedAxisCesiumWriter>>(CreateUnitCartesian3, false);
}
[NotNull]
private CesiumUnitCartesian3ValuePropertyAdaptor<AlignedAxisCesiumWriter> CreateUnitCartesian3()
{
return CesiumValuePropertyAdaptors.CreateUnitCartesian3(this);
......@@ -284,16 +300,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumUnitSphericalValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumUnitSphericalValuePropertyAdaptor<AlignedAxisCesiumWriter> AsUnitSpherical()
{
return m_asUnitSpherical.Value;
}
[NotNull]
private Lazy<CesiumUnitSphericalValuePropertyAdaptor<AlignedAxisCesiumWriter>> CreateAsUnitSpherical()
{
return new Lazy<CesiumUnitSphericalValuePropertyAdaptor<AlignedAxisCesiumWriter>>(CreateUnitSpherical, false);
}
[NotNull]
private CesiumUnitSphericalValuePropertyAdaptor<AlignedAxisCesiumWriter> CreateUnitSpherical()
{
return CesiumValuePropertyAdaptors.CreateUnitSpherical(this);
......@@ -303,16 +322,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumReferenceValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter> AsReference()
{
return m_asReference.Value;
}
[NotNull]
private Lazy<CesiumReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter>> CreateAsReference()
{
return new Lazy<CesiumReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter>>(CreateReference, false);
}
[NotNull]
private CesiumReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter> CreateReference()
{
return CesiumValuePropertyAdaptors.CreateReference(this);
......@@ -322,16 +344,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumVelocityReferenceValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumVelocityReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter> AsVelocityReference()
{
return m_asVelocityReference.Value;
}
[NotNull]
private Lazy<CesiumVelocityReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter>> CreateAsVelocityReference()
{
return new Lazy<CesiumVelocityReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter>>(CreateVelocityReference, false);
}
[NotNull]
private CesiumVelocityReferenceValuePropertyAdaptor<AlignedAxisCesiumWriter> CreateVelocityReference()
{
return CesiumValuePropertyAdaptors.CreateVelocityReference(this);
......
......@@ -17,19 +17,26 @@ namespace CesiumLanguageWriter
/// <summary>
/// The name of the <c>arcType</c> property.
/// </summary>
[NotNull]
public const string ArcTypePropertyName = "arcType";
/// <summary>
/// The name of the <c>reference</c> property.
/// </summary>
[NotNull]
public const string ReferencePropertyName = "reference";
/// <summary>
/// The name of the <c>delete</c> property.
/// </summary>
[NotNull]
public const string DeletePropertyName = "delete";
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumArcTypeValuePropertyAdaptor<ArcTypeCesiumWriter>> m_asArcType;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumReferenceValuePropertyAdaptor<ArcTypeCesiumWriter>> m_asReference;
/// <summary>
......@@ -144,16 +151,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumArcTypeValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumArcTypeValuePropertyAdaptor<ArcTypeCesiumWriter> AsArcType()
{
return m_asArcType.Value;
}
[NotNull]
private Lazy<CesiumArcTypeValuePropertyAdaptor<ArcTypeCesiumWriter>> CreateAsArcType()
{
return new Lazy<CesiumArcTypeValuePropertyAdaptor<ArcTypeCesiumWriter>>(CreateArcType, false);
}
[NotNull]
private CesiumArcTypeValuePropertyAdaptor<ArcTypeCesiumWriter> CreateArcType()
{
return CesiumValuePropertyAdaptors.CreateArcType(this);
......@@ -163,16 +173,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumReferenceValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumReferenceValuePropertyAdaptor<ArcTypeCesiumWriter> AsReference()
{
return m_asReference.Value;
}
[NotNull]
private Lazy<CesiumReferenceValuePropertyAdaptor<ArcTypeCesiumWriter>> CreateAsReference()
{
return new Lazy<CesiumReferenceValuePropertyAdaptor<ArcTypeCesiumWriter>>(CreateReference, false);
}
[NotNull]
private CesiumReferenceValuePropertyAdaptor<ArcTypeCesiumWriter> CreateReference()
{
return CesiumValuePropertyAdaptors.CreateReference(this);
......
......@@ -18,19 +18,26 @@ namespace CesiumLanguageWriter
/// <summary>
/// The name of the <c>number</c> property.
/// </summary>
[NotNull]
public const string NumberPropertyName = "number";
/// <summary>
/// The name of the <c>reference</c> property.
/// </summary>
[NotNull]
public const string ReferencePropertyName = "reference";
/// <summary>
/// The name of the <c>delete</c> property.
/// </summary>
[NotNull]
public const string DeletePropertyName = "delete";
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumDoubleValuePropertyAdaptor<ArticulationCesiumWriter>> m_asNumber;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumReferenceValuePropertyAdaptor<ArticulationCesiumWriter>> m_asReference;
/// <summary>
......@@ -169,16 +176,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumDoubleValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumDoubleValuePropertyAdaptor<ArticulationCesiumWriter> AsNumber()
{
return m_asNumber.Value;
}
[NotNull]
private Lazy<CesiumDoubleValuePropertyAdaptor<ArticulationCesiumWriter>> CreateAsNumber()
{
return new Lazy<CesiumDoubleValuePropertyAdaptor<ArticulationCesiumWriter>>(CreateDouble, false);
}
[NotNull]
private CesiumDoubleValuePropertyAdaptor<ArticulationCesiumWriter> CreateDouble()
{
return CesiumValuePropertyAdaptors.CreateDouble(this);
......@@ -188,16 +198,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumReferenceValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumReferenceValuePropertyAdaptor<ArticulationCesiumWriter> AsReference()
{
return m_asReference.Value;
}
[NotNull]
private Lazy<CesiumReferenceValuePropertyAdaptor<ArticulationCesiumWriter>> CreateAsReference()
{
return new Lazy<CesiumReferenceValuePropertyAdaptor<ArticulationCesiumWriter>>(CreateReference, false);
}
[NotNull]
private CesiumReferenceValuePropertyAdaptor<ArticulationCesiumWriter> CreateReference()
{
return CesiumValuePropertyAdaptors.CreateReference(this);
......
......@@ -18,19 +18,26 @@ namespace CesiumLanguageWriter
/// <summary>
/// The name of the <c>cartesian2</c> property.
/// </summary>
[NotNull]
public const string Cartesian2PropertyName = "cartesian2";
/// <summary>
/// The name of the <c>reference</c> property.
/// </summary>
[NotNull]
public const string ReferencePropertyName = "reference";
/// <summary>
/// The name of the <c>delete</c> property.
/// </summary>
[NotNull]
public const string DeletePropertyName = "delete";
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumCartesian2ValuePropertyAdaptor<BackgroundPaddingCesiumWriter>> m_asCartesian2;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumReferenceValuePropertyAdaptor<BackgroundPaddingCesiumWriter>> m_asReference;
/// <summary>
......@@ -173,16 +180,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumCartesian2ValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumCartesian2ValuePropertyAdaptor<BackgroundPaddingCesiumWriter> AsCartesian2()
{
return m_asCartesian2.Value;
}
[NotNull]
private Lazy<CesiumCartesian2ValuePropertyAdaptor<BackgroundPaddingCesiumWriter>> CreateAsCartesian2()
{
return new Lazy<CesiumCartesian2ValuePropertyAdaptor<BackgroundPaddingCesiumWriter>>(CreateCartesian2, false);
}
[NotNull]
private CesiumCartesian2ValuePropertyAdaptor<BackgroundPaddingCesiumWriter> CreateCartesian2()
{
return CesiumValuePropertyAdaptors.CreateCartesian2(this);
......@@ -192,16 +202,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumReferenceValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumReferenceValuePropertyAdaptor<BackgroundPaddingCesiumWriter> AsReference()
{
return m_asReference.Value;
}
[NotNull]
private Lazy<CesiumReferenceValuePropertyAdaptor<BackgroundPaddingCesiumWriter>> CreateAsReference()
{
return new Lazy<CesiumReferenceValuePropertyAdaptor<BackgroundPaddingCesiumWriter>>(CreateReference, false);
}
[NotNull]
private CesiumReferenceValuePropertyAdaptor<BackgroundPaddingCesiumWriter> CreateReference()
{
return CesiumValuePropertyAdaptors.CreateReference(this);
......
......@@ -19,101 +19,121 @@ namespace CesiumLanguageWriter
/// <summary>
/// The name of the <c>show</c> property.
/// </summary>
[NotNull]
public const string ShowPropertyName = "show";
/// <summary>
/// The name of the <c>image</c> property.
/// </summary>
[NotNull]
public const string ImagePropertyName = "image";
/// <summary>
/// The name of the <c>scale</c> property.
/// </summary>
[NotNull]
public const string ScalePropertyName = "scale";
/// <summary>
/// The name of the <c>pixelOffset</c> property.
/// </summary>
[NotNull]
public const string PixelOffsetPropertyName = "pixelOffset";
/// <summary>
/// The name of the <c>eyeOffset</c> property.
/// </summary>
[NotNull]
public const string EyeOffsetPropertyName = "eyeOffset";
/// <summary>
/// The name of the <c>horizontalOrigin</c> property.
/// </summary>
[NotNull]
public const string HorizontalOriginPropertyName = "horizontalOrigin";
/// <summary>
/// The name of the <c>verticalOrigin</c> property.
/// </summary>
[NotNull]
public const string VerticalOriginPropertyName = "verticalOrigin";
/// <summary>
/// The name of the <c>heightReference</c> property.
/// </summary>
[NotNull]
public const string HeightReferencePropertyName = "heightReference";
/// <summary>
/// The name of the <c>color</c> property.
/// </summary>
[NotNull]
public const string ColorPropertyName = "color";
/// <summary>
/// The name of the <c>rotation</c> property.
/// </summary>
[NotNull]
public const string RotationPropertyName = "rotation";
/// <summary>
/// The name of the <c>alignedAxis</c> property.
/// </summary>
[NotNull]
public const string AlignedAxisPropertyName = "alignedAxis";
/// <summary>
/// The name of the <c>sizeInMeters</c> property.
/// </summary>
[NotNull]
public const string SizeInMetersPropertyName = "sizeInMeters";
/// <summary>
/// The name of the <c>width</c> property.
/// </summary>
[NotNull]
public const string WidthPropertyName = "width";
/// <summary>
/// The name of the <c>height</c> property.
/// </summary>
[NotNull]
public const string HeightPropertyName = "height";
/// <summary>
/// The name of the <c>scaleByDistance</c> property.
/// </summary>
[NotNull]
public const string ScaleByDistancePropertyName = "scaleByDistance";
/// <summary>
/// The name of the <c>translucencyByDistance</c> property.
/// </summary>
[NotNull]
public const string TranslucencyByDistancePropertyName = "translucencyByDistance";
/// <summary>
/// The name of the <c>pixelOffsetScaleByDistance</c> property.
/// </summary>
[NotNull]
public const string PixelOffsetScaleByDistancePropertyName = "pixelOffsetScaleByDistance";
/// <summary>
/// The name of the <c>imageSubRegion</c> property.
/// </summary>
[NotNull]
public const string ImageSubRegionPropertyName = "imageSubRegion";
/// <summary>
/// The name of the <c>distanceDisplayCondition</c> property.
/// </summary>
[NotNull]
public const string DistanceDisplayConditionPropertyName = "distanceDisplayCondition";
/// <summary>
/// The name of the <c>disableDepthTestDistance</c> property.
/// </summary>
[NotNull]
public const string DisableDepthTestDistancePropertyName = "disableDepthTestDistance";
private readonly Lazy<BooleanCesiumWriter> m_show = new Lazy<BooleanCesiumWriter>(() => new BooleanCesiumWriter(ShowPropertyName), false);
......
......@@ -17,19 +17,26 @@ namespace CesiumLanguageWriter
/// <summary>
/// The name of the <c>boolean</c> property.
/// </summary>
[NotNull]
public const string BooleanPropertyName = "boolean";
/// <summary>
/// The name of the <c>reference</c> property.
/// </summary>
[NotNull]
public const string ReferencePropertyName = "reference";
/// <summary>
/// The name of the <c>delete</c> property.
/// </summary>
[NotNull]
public const string DeletePropertyName = "delete";
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumBooleanValuePropertyAdaptor<BooleanCesiumWriter>> m_asBoolean;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumReferenceValuePropertyAdaptor<BooleanCesiumWriter>> m_asReference;
/// <summary>
......@@ -144,16 +151,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumBooleanValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumBooleanValuePropertyAdaptor<BooleanCesiumWriter> AsBoolean()
{
return m_asBoolean.Value;
}
[NotNull]
private Lazy<CesiumBooleanValuePropertyAdaptor<BooleanCesiumWriter>> CreateAsBoolean()
{
return new Lazy<CesiumBooleanValuePropertyAdaptor<BooleanCesiumWriter>>(CreateBoolean, false);
}
[NotNull]
private CesiumBooleanValuePropertyAdaptor<BooleanCesiumWriter> CreateBoolean()
{
return CesiumValuePropertyAdaptors.CreateBoolean(this);
......@@ -163,16 +173,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumReferenceValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumReferenceValuePropertyAdaptor<BooleanCesiumWriter> AsReference()
{
return m_asReference.Value;
}
[NotNull]
private Lazy<CesiumReferenceValuePropertyAdaptor<BooleanCesiumWriter>> CreateAsReference()
{
return new Lazy<CesiumReferenceValuePropertyAdaptor<BooleanCesiumWriter>>(CreateReference, false);
}
[NotNull]
private CesiumReferenceValuePropertyAdaptor<BooleanCesiumWriter> CreateReference()
{
return CesiumValuePropertyAdaptors.CreateReference(this);
......
......@@ -18,19 +18,26 @@ namespace CesiumLanguageWriter
/// <summary>
/// The name of the <c>boundingRectangle</c> property.
/// </summary>
[NotNull]
public const string BoundingRectanglePropertyName = "boundingRectangle";
/// <summary>
/// The name of the <c>reference</c> property.
/// </summary>
[NotNull]
public const string ReferencePropertyName = "reference";
/// <summary>
/// The name of the <c>delete</c> property.
/// </summary>
[NotNull]
public const string DeletePropertyName = "delete";
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumBoundingRectangleValuePropertyAdaptor<BoundingRectangleCesiumWriter>> m_asBoundingRectangle;
[NotNull]
[CSToJavaFinalField]
private readonly Lazy<CesiumReferenceValuePropertyAdaptor<BoundingRectangleCesiumWriter>> m_asReference;
/// <summary>
......@@ -163,16 +170,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumBoundingRectangleValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumBoundingRectangleValuePropertyAdaptor<BoundingRectangleCesiumWriter> AsBoundingRectangle()
{
return m_asBoundingRectangle.Value;
}
[NotNull]
private Lazy<CesiumBoundingRectangleValuePropertyAdaptor<BoundingRectangleCesiumWriter>> CreateAsBoundingRectangle()
{
return new Lazy<CesiumBoundingRectangleValuePropertyAdaptor<BoundingRectangleCesiumWriter>>(CreateBoundingRectangle, false);
}
[NotNull]
private CesiumBoundingRectangleValuePropertyAdaptor<BoundingRectangleCesiumWriter> CreateBoundingRectangle()
{
return CesiumValuePropertyAdaptors.CreateBoundingRectangle(this);
......@@ -182,16 +192,19 @@ namespace CesiumLanguageWriter
/// Returns a wrapper for this instance that implements <see cref="ICesiumReferenceValuePropertyWriter"/>. Because the returned instance is a wrapper for this instance, you may call <see cref="ICesiumElementWriter.Close"/> on either this instance or the wrapper, but you must not call it on both.
/// </summary>
/// <returns>The wrapper.</returns>
[NotNull]
public CesiumReferenceValuePropertyAdaptor<BoundingRectangleCesiumWriter> AsReference()
{
return m_asReference.Value;
}
[NotNull]
private Lazy<CesiumReferenceValuePropertyAdaptor<BoundingRectangleCesiumWriter>> CreateAsReference()
{
return new Lazy<CesiumReferenceValuePropertyAdaptor<BoundingRectangleCesiumWriter>>(CreateReference, false);
}
[NotNull]
private CesiumReferenceValuePropertyAdaptor<BoundingRectangleCesiumWriter> CreateReference()