Attempt to parse an EntityTypeName from a string, and allocate the result as a Java object
(env: &mut JNIEnv<'a>, src: &str)
| 115 | |
| 116 | /// Attempt to parse an EntityTypeName from a string, and allocate the result as a Java object |
| 117 | pub fn parse(env: &mut JNIEnv<'a>, src: &str) -> Result<JOptional<'a, Self>> { |
| 118 | match EntityTypeName::from_str(src) { |
| 119 | Ok(etype) => { |
| 120 | let jetype = Self::try_from(env, &etype)?; |
| 121 | JOptional::of(env, jetype) |
| 122 | } |
| 123 | Err(_) => JOptional::empty(env), |
| 124 | } |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | impl<'a> Object<'a> for JEntityTypeName<'a> { |
no outgoing calls
no test coverage detected