Questions tagged [generated-code]
231 questions
1
vote
1 answer
Separate client and server generated by protoc
I am trying to have protoc-generated server interface and client implementation in separate packages
The header part of my .proto files is the following:
syntax = "proto3";
option go_package = "github.com///pkg/grpc";
And I am…

Alexander
- 103
- 2
- 8
1
vote
1 answer
How to properly generate a DNA sequence from user input?
I'm creating a code for "software" that'll ask the user how many sequences of DNA barcodes (n) they want and what is the length (size) of the DNA barcode he wants. And according to the user parameters it must generate a text file containing a total…

mark122021
- 61
- 6
1
vote
0 answers
How do you relocate JMH Generated directories in gradle subprojects?
Trying to relocate generated sources for JMH build under kotlin gradle with melix/jmh-gradle-plugin
From :
.../projectroot/SUBPRJ_A/BUILD/jmh-generated-sources/...
To :
.../projectroot/BUILD/subProjects/SUBPRJ_A/jmh-generated-sources/...
I've tried…

JDMcMillian
- 219
- 1
- 7
1
vote
2 answers
Generated code stays in build folder after Android Studio Build
I am using a gradle task to generate some code for my API and store this code into the build folder. When I am building my application the process deletes the build folder.
Is there a way to call my code generation task between the folder deletion…

Vaggelis Larios
- 11
- 1
- 5
1
vote
2 answers
Generate 5 length unique code from natural number
I need to generate a unique code with 5 lengths with the given number. In other words, I need to encode natural number to 5 length unique code
I wanna give fixed-length rememberable code to the customer, and keep the sequential number in the…

Aliasghar Ahmadpour
- 436
- 6
- 24
1
vote
2 answers
How to handle generated code with Flutter null safety?
I'm using flutter retrofit package (https://pub.dev/packages/retrofit) but they doesn't have null safety version yet. When I run build and the generated code doesn't have the null check. How can't i solve this without manual add "// @dart=2.9" to…

Kyo Huu
- 520
- 7
- 13
1
vote
0 answers
Angular - How to integrate generated sources
I'm currently developing an Angular + Spring Boot application. I manage both projects with maven. For Maven I have a plugin that generates DTOs for Java AND TypeScript/Angular. Dealing with the genrated Java sources is no problem as Maven offers…

mrdlink
- 266
- 4
- 15
1
vote
0 answers
Proper use of Java annotations to generate classes based on imported, external library classes
Given some imported classes that I cannot affect,
import com.foo.A;
import com.foo.B;
import com.foo.C;
I want to generate an interface of methods shared by A, B, and C, e.g.
public interface Common {
Uuid getId();
Long getVersion();
…

Andrew Cheong
- 29,362
- 15
- 90
- 145
1
vote
1 answer
Is it possible to have a Java annotation that doesn't apply to any class, method, field, etc. Just the annotation itself generating code
Are there such things as Java annotations that aren't tied to any class, method, field, etc.?
Like just writing
@MyAnnotation(someParameter=value, ...)
by itself, and it generates code.
It seems like ExecutableType might define what kinds of…

Andrew Cheong
- 29,362
- 15
- 90
- 145
1
vote
0 answers
How to include sources generated by jaxb in spring-boot repackage plugin phase?
I am currently developing a spring boot app where I have resources being generated by JAXB and I want to repackage a jar with those files. I have tried multiple approaches with the includes tag in configuration area but they all fail.
I have a very…

Danilo Silva
- 121
- 10
1
vote
2 answers
Generated setter clashes with an interface method
I am writing a class implementing an interface that exposes a setSelected method. This class will have a selected property:
private class Foo : IFoo {
var selected = false
override fun setSelected(isActive: Boolean) {
…

PLNech
- 3,087
- 1
- 23
- 52
1
vote
0 answers
Tool to generate files based on user input
I am trying to find a tool that have some these inputs
1. User input(mostly numeric values)
2. Template files that have keywords in a specific format
The tool should then be able to replace the keywords in template files with values based on user…

Ahmed Khaled
- 11
- 1
1
vote
0 answers
Invoking the compile lifecycle phase to test my source generating maven plugin
I am writing a maven plugin that generates source code. I have created my plugin project using the maven-archetype-plugin archetype.
The maven-archetype-plugin archetype creates a project-to-test under src/test/resources.
I would like to execute…

spierepf
- 2,774
- 2
- 30
- 52
1
vote
3 answers
What causes Visual Studio 2008 form designer to auto-generate broken code?
I have been developing a windows form based project in visual basic .NET, moving the code between several computers simply by copying the solution folder. This has never caused any problems in the past, however my current project seems to have…

omaskery
- 53
- 6
1
vote
2 answers
generate div elements based on string paths
I'm working on a chrome extension and need to generate nested DOM-elements based on categories. These categories are saved as strings in an array. The hierarchy level of sub-categories is shown through paths.
Here is an simple example
category…

iamrobin.
- 1,554
- 3
- 19
- 31