-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b6e05c
commit e52e3f0
Showing
5 changed files
with
30 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 23 additions & 25 deletions
48
src/main/java/com/github/_1c_syntax/mdclasses/ValueTypeConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,39 @@ | ||
/* | ||
* This file is a part of MDClasses. | ||
* | ||
* Copyright (c) 2019 - 2024 | ||
* Tymko Oleg <[email protected]>, Maximov Valery <[email protected]> and contributors | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* MDClasses is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* MDClasses is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with MDClasses. | ||
*/ | ||
package com.github._1c_syntax.mdclasses; | ||
/* | ||
* This file is a part of MDClasses. | ||
* | ||
* Copyright (c) 2019 - 2024 | ||
* Tymko Oleg <[email protected]>, Maximov Valery <[email protected]> and contributors | ||
* | ||
* SPDX-License-Identifier: LGPL-3.0-or-later | ||
* | ||
* MDClasses is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 3.0 of the License, or (at your option) any later version. | ||
* | ||
* MDClasses is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with MDClasses. | ||
*/ | ||
package com.github._1c_syntax.mdclasses; | ||
|
||
import com.github._1c_syntax.bsl.reader.MDOReader; | ||
import com.github._1c_syntax.bsl.reader.common.xstream.ReadConverter; | ||
import com.github._1c_syntax.mdclasses.mdo.support.ValueType; | ||
import com.thoughtworks.xstream.converters.UnmarshallingContext; | ||
import com.thoughtworks.xstream.io.HierarchicalStreamReader; | ||
|
||
import java.util.stream.Collectors; | ||
|
||
public class ValueTypeConverter implements ReadConverter { | ||
|
||
@Override | ||
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) { | ||
var valueType = (ValueType) context.convertAnother(reader, ValueType.class, | ||
MDOReader.getReflectionConverter(reader)); | ||
return valueType.getTypes().stream().map(String::intern).collect(Collectors.toList()); | ||
return valueType.getTypes().stream().map(String::intern).toList(); | ||
} | ||
|
||
@Override | ||
|