Package com.here

Class NativeBase

java.lang.Object
com.here.NativeBase
Direct Known Subclasses:
Angle, AssetsManager, Authentication, AuthenticationMode, CatalogVersionHint, DataAttributes, DataAttributesAccessor, DataAttributesBuilder, DataAttributeValue, Easing, FlingHandler, Gestures, HereMap, IndexRange, Isoline, IsolineRoutingEngine, JsonStyleFactory, LineData, LineDataAccessor, LineDataBuilder, LineDataSource, LineDataSourceBuilder, LineTileDataSource, LocationIndicator, LockingProcess, LogControl, Maneuver, MapArrow, MapCamera, MapCameraAnimation, MapCameraAnimationFactory, MapCameraKeyframeTrack, MapCameraLimits, MapCameraUpdate, MapCameraUpdateFactory, MapContentSettings, MapContext, MapImage, MapImageOverlay, MapItemKeyFrameTrack, MapItemRepresentation, MapLayer, MapLayerBuilder, MapLayerMapMeasureDependentStorageLevels, MapLayerPriority, MapLayerPriorityBuilder, MapMarker, MapMarker.TextStyle, MapMarker3D, MapMarker3DModel, MapMarkerAnimation, MapMarkerCluster, MapObjectDescriptor, MapPickResult, MapPolygon, MapPolyline, MapPolylineAnimation, MapScene, MapScene.MapPickFilter, MapSceneLights, MapSceneLoadOptions, MapSceneLoadOptionsBuilder, Mesh, MeshBuilder, Metadata, PickMapContentResult, PickMapContentResult.TrafficIncidentResult, PickMapItemsResult, Place, PlaceCategory, PointData, PointDataAccessor, PointDataBuilder, PointDataSource, PointDataSourceBuilder, PointTileDataSource, PolygonData, PolygonDataAccessor, PolygonDataBuilder, PolygonDataSource, PolygonDataSourceBuilder, PolygonTileDataSource, PolylineSimplifier, RasterDataSource, RefreshRouteOptions, Route, RoutingEngine, ScaleHandler, ScrollHandler, SDKBuildInformation, SDKLogger, SDKNativeEngine, SearchEngine, Section, Span, Style, Suggestion, Threading, TileGeoBoundsCalculator, TileUrlProviderFactory, TimeRule, TrafficDataProvider, TrafficEngine, TrafficFlow, TrafficIncident, TrafficIncidentOnRoute, TransitRoutingEngine, TranslucentMapLayerGroup, TransportSpecification.BicycleBuilder, TransportSpecification.BusBuilder, TransportSpecification.CarBuilder, TransportSpecification.PedestrianBuilder, TransportSpecification.PrivateBusBuilder, TransportSpecification.ScooterBuilder, TransportSpecification.TaxiBuilder, TransportSpecification.TruckBuilder, VehicleSpecification.BusBuilder, VehicleSpecification.CarBuilder, VehicleSpecification.PrivateBusBuilder, VehicleSpecification.ScooterBuilder, VehicleSpecification.TaxiBuilder, VehicleSpecification.TruckBuilder

public abstract class NativeBase extends Object

Internal base class for public non-POD objects to manage the lifecycle of underlying C++ objects. While the class is public for technical reasons, but should be considered internal and not part of the public API and thus not used directly.

Java classes which wrap C++ objects inherit from NativeBase to

  1. reference the C++ object
  2. manage the lifecycle of C++ object

Cleanup of C++ objects is done automatically as long as there are new subclasses of NativeBase created. Currently there is no explicit way to destroy the underlying C++ object of a Java wrapper. This is intentional because normally no manual cleanup is necessary. Additionally the client of the Java wrapper would need additional knowledge of the underlying implementation to be able to decide whether or not cleanup is necessary. It is not clear for the client which object needs cleanup and which doesn't if all objects have auto-generated cleanup functions. So instead API designers should manually define methods if resource cleanup is necessary.