Preserve constructor when annotating fields


Nason

I have the following class.

public class StatusCategory
{
   @JsonProperty("key")
   private final String m_key = null;

   public String getKey()
   {
      return(m_key);
   }
}

What -keepoptions are there to ensure that Proguard doesn't delete the constructor?

The constructor will remain below; however, I don't want to specify every class or package.

-keep class oracle.psr.ndr.jira.api.StatusCategory {<init>;}
Wilson

@JsonCreatorAnnotate the constructor as follows and use :-keepclassmembers

-keepclassmembers public class * {
     @com.fasterxml.jackson.annotation.JsonCreator *;
}

Related


Preserve constructor when annotating fields

Nason: I have the following class. public class StatusCategory { @JsonProperty("key") private final String m_key = null; public String getKey() { return(m_key); } } What -keepoptions are there to ensure that Proguard doesn't delete the c

Preserve constructor when annotating fields

Nason I have the following class. public class StatusCategory { @JsonProperty("key") private final String m_key = null; public String getKey() { return(m_key); } } What -keepoptions are there to ensure that Proguard doesn't delete the co

Preserve constructor when annotating fields

Nason: I have the following class. public class StatusCategory { @JsonProperty("key") private final String m_key = null; public String getKey() { return(m_key); } } What -keepoptions are there to ensure that Proguard doesn't delete the c

awk: preserve format of output when replacing fields

jam When changing fields in awk, the whole string ($0) will be split and reformatted with OFS (default <space>). How can I suppress or change that behavior so that the formatting is preserved? For example, df -houtput a table where fields (columns) are separat

Duplicate fields when initializing constructor

Sion0 Sorry for possible repetition. I don't know how to google it. Is it possible to repeat fields in the initializer list of a const constructor? example: const struct first _first = { .value = 1, .value = 2, /* same field again */ }; const struct s

Duplicate fields when initializing constructor

Sion0 Sorry for possible repetition. I don't know how to google it. Is it possible to repeat fields in the initializer list of a const constructor? example: const struct first _first = { .value = 1, .value = 2, /* same field again */ }; const struct s

Duplicate fields when initializing constructor

Sion0 Sorry for possible repetition. I don't know how to google it. Is it possible to repeat fields in the initializer list of a const constructor? example: const struct first _first = { .value = 1, .value = 2, /* same field again */ }; const struct s

Duplicate fields when initializing constructor

Sion0 Sorry for possible repetition. I don't know how to google it. Is it possible to repeat fields in the initializer list of a const constructor? example: const struct first _first = { .value = 1, .value = 2, /* same field again */ }; const struct s

Hibernate/JPA - Annotating bean methods vs fields

benstpierre: I have a simple question about Hibernate usage. I keep seeing people using JPA annotations in one of two ways, by annotating the fields of the class and also by annotating the get method of the corresponding bean. My question is the following: wit

Hibernate/JPA - Annotating bean methods vs fields

benstpierre: I have a simple question about Hibernate usage. I keep seeing people using JPA annotations in one of two ways, by annotating the fields of the class and also by annotating the get method of the corresponding bean. My question is the following: wit

Hibernate/JPA - Annotating bean methods vs fields

Benstpierre : I have a simple question about Hibernate usage. I keep seeing people using JPA annotations in one of two ways, by annotating the fields of the class and also by annotating the get method of the corresponding bean. My question is the following: wi

Preserve $group collapsed fields

this is not me I want to summarize a set of documents by relying on a field called code. How can I aggregate the data and retain the details in the original document? The pipeline input contains the following documents. { "_id" : ObjectId("5ff38e0eb09dec2

Preserve $group collapsed fields

this is not me I want to summarize a set of documents by relying on a field called code. How can I aggregate the data and retain the details in the original document? The pipeline input contains the following documents. { "_id" : ObjectId("5ff38e0eb09dec2

Preserve $group collapsed fields

this is not me I want to summarize a set of documents by relying on a field called code. How can I aggregate the data and retain the details in the original document? The pipeline input contains the following documents. { "_id" : ObjectId("5ff38e0eb09dec2

Preserve $group collapsed fields

this is not me I want to summarize a set of documents by relying on a field called code. How can I aggregate the data and retain the details in the original document? The pipeline input contains the following documents. { "_id" : ObjectId("5ff38e0eb09dec2

Preserve $group collapsed fields

this is not me I want to summarize a set of documents by relying on a field called code. How can I aggregate the data and retain the details in the original document? The pipeline input contains the following documents. { "_id" : ObjectId("5ff38e0eb09dec2

MatPlotLib key error: 0 when annotating

prom In this code, I'm trying to create a bar chart with one bar (as the "total" bar, which will be placed next to the other bars) and part of a data frame. It works for another slice of the dataframe, but for the "total" slice (only one row), I keep getting t

Syntax when annotating tables in SQL (Oracle)

Mayotte I want to annotate a table in SQL (Oracle) and add a URL to this annotation: comment on table A is 'https://stackoverflow.com/'; But it returns an error: unknown command. What is the correct syntax and how to escape special characters? Jeff Smith simp

Does LinkedHashSet constructor preserve order

AnnTea : LinkedHashSet(Collection<? extends E> c)Assuming the arguments are ordered collections, does the constructor guarantee that its arguments are ordered to be preserved? How can we be sure? The Javadoc documentation doesn't say anything about the order:

Does LinkedHashSet constructor preserve order

AnnTea : LinkedHashSet(Collection<? extends E> c)Assuming the arguments are ordered collections, does the constructor guarantee that its arguments are ordered to be preserved? How can we be sure? The Javadoc documentation doesn't say anything about the order:

Does LinkedHashSet constructor preserve order

AnnTea : LinkedHashSet(Collection<? extends E> c)Assuming the arguments are ordered collections, does the constructor guarantee that its arguments are ordered to be preserved? How can we be sure? The Javadoc documentation doesn't say anything about the order: