Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add primitive Stack factories in API. Closes #1207.
Signed-off-by: Rinat Gatyatullin <rinattalgatovich.gatyatullin@bnymellon.com>
- Loading branch information
Rinat Gatyatullin
committed
Mar 4, 2022
1 parent
3163e7b
commit f9000bc
Showing
7 changed files
with
122 additions
and
5 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...s-api/src/main/java/org/eclipse/collections/api/factory/stack/primitive/package-info.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* Copyright (c) 2022 Goldman Sachs and others. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* and Eclipse Distribution License v. 1.0 which accompany this distribution. | ||
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html | ||
* and the Eclipse Distribution License is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
*/ | ||
|
||
/** | ||
* This package contains factory API for creating primitive stack instances. | ||
*/ | ||
package org.eclipse.collections.api.factory.stack.primitive; |
40 changes: 40 additions & 0 deletions
40
eclipse-collections-code-generator/src/main/resources/api/factory/primitiveStacksAPI.stg
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import "copyrightAndOthers.stg" | ||
|
||
targetPath() ::= "org/eclipse/collections/api/factory/primitive" | ||
|
||
fileName(primitive) ::= "<primitive.name>Stacks" | ||
|
||
class(primitive) ::= << | ||
<body(primitive.type, primitive.name)> | ||
>> | ||
|
||
body(type, name) ::= << | ||
<copyrightAndOthers()> | ||
|
||
package org.eclipse.collections.api.factory.primitive; | ||
|
||
import org.eclipse.collections.api.factory.ServiceLoaderUtils; | ||
import org.eclipse.collections.api.factory.stack.primitive.Immutable<name>StackFactory; | ||
import org.eclipse.collections.api.factory.stack.primitive.Mutable<name>StackFactory; | ||
|
||
/** | ||
* <name>Stacks is a static utility for creating {@link Immutable<name>StackFactory} and {@link Mutable<name>StackFactory}. | ||
* This file was automatically generated from template file primitiveStacksAPI.stg. | ||
* | ||
* @since 11.1. | ||
*/ | ||
@SuppressWarnings("ConstantNamingConvention") | ||
public final class <name>Stacks | ||
{ | ||
public static final Immutable<name>StackFactory immutable = | ||
ServiceLoaderUtils.loadServiceClass(Immutable<name>StackFactory.class); | ||
public static final Mutable<name>StackFactory mutable = | ||
ServiceLoaderUtils.loadServiceClass(Mutable<name>StackFactory.class); | ||
|
||
private <name>Stacks() | ||
{ | ||
throw new AssertionError("Suppress default constructor for noninstantiability"); | ||
} | ||
} | ||
|
||
>> |
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
11 changes: 11 additions & 0 deletions
11
...ions-code-generator/src/main/resources/services/serviceImmutablePrimitiveStackFactory.stg
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
targetPath() ::= "" | ||
|
||
fileName(primitive) ::= "org.eclipse.collections.api.factory.stack.primitive.Immutable<primitive.name>StackFactory" | ||
|
||
class(primitive) ::= << | ||
<body(primitive.type, primitive.name, primitive.wrapperName)> | ||
>> | ||
|
||
body(type, name, wrapperName) ::= << | ||
org.eclipse.collections.impl.stack.immutable.primitive.Immutable<primitive.name>StackFactoryImpl | ||
>> |
11 changes: 11 additions & 0 deletions
11
...ctions-code-generator/src/main/resources/services/serviceMutablePrimitiveStackFactory.stg
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
targetPath() ::= "" | ||
|
||
fileName(primitive) ::= "org.eclipse.collections.api.factory.stack.primitive.Mutable<primitive.name>StackFactory" | ||
|
||
class(primitive) ::= << | ||
<body(primitive.type, primitive.name, primitive.wrapperName)> | ||
>> | ||
|
||
body(type, name, wrapperName) ::= << | ||
org.eclipse.collections.impl.stack.mutable.primitive.Mutable<primitive.name>StackFactoryImpl | ||
>> |
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