pub enum JavaMapping {
Omg,
Psm,
}Expand description
The shape generated Java types take.
The default of idlc generate --lang java is JavaMapping::Psm, Clause 9
of DDS-Java-PSM 1.0, “Improved Plain Language Binding for Java”; the
IDL-to-Java mapping of the OMG (JavaMapping::Omg, public fields and
T[] for every sequence) is the named option --java-mapping omg.
JavaMapping::Psm changes two things against it.
- §9.1.1: “DDS aggregation types shall be mapped to a final Java
class. Contained attributes shall be encapsulated. Java Bean style
accessors shall be provided.” A structure, a union (its
discriminator is the property
discriminator), a bit set and an exception become apublic static final classwith private state, a no-argument constructor andgetX()/setX(v)for each member; abooleanmember also hasisX(). The entry class of amapis not an IDL aggregate and stays a two-field holder. - §9.1.2: “Unbounded DDS sequences are mapped to
Collection<E>interface. […] Bounded sequences and arrays are mapped to Java arrays.” An unboundedsequence<T>is ajava.util.Collection<E>withEthe boxed type ofT.
Nothing else moves: the integer table, string, fixed, enumerations,
bitmasks, map and the optional member are as they are.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for JavaMapping
impl Clone for JavaMapping
impl Copy for JavaMapping
Source§impl Debug for JavaMapping
impl Debug for JavaMapping
Source§impl Default for JavaMapping
impl Default for JavaMapping
impl Eq for JavaMapping
Source§impl PartialEq for JavaMapping
impl PartialEq for JavaMapping
impl StructuralPartialEq for JavaMapping
Auto Trait Implementations§
impl Freeze for JavaMapping
impl RefUnwindSafe for JavaMapping
impl Send for JavaMapping
impl Sync for JavaMapping
impl Unpin for JavaMapping
impl UnsafeUnpin for JavaMapping
impl UnwindSafe for JavaMapping
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more