Questions tagged [refactoring]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3
votes
1answer
32 views

If I know the class type of an Enum, how can I get a list of the values?

I have the following method: public XAP_ENUM_EnumConverter put(Type enumType, XAP_ENUM_EnumWrapper enumWrapper) { ENUM_WRAPPERS_BY_TYPE_MAP.put(enumType, enumWrapper); return this;...
1
vote
1answer
26 views

Automatically set a value on an attribute sobject field

I have a class with more than 10 attributes (fields). Each attribute is filled depending of a context (conditions "if"): if(value == '1'){ myobject.attribute1 = value; }else if(value == '2'){ ...
1
vote
1answer
25 views

Moving code to trigger for Lightning and And Visualforce

I have a vf page that accepts few url query parameters. When a submit button is clicked, the apex controller takes the parameter and depending upon the parameter values different sorts of SOQL and DML ...
0
votes
1answer
49 views

Type name already in use - Unable to use Rename Symbol command to correct Apex class name capitalisation

I use Apex PMD, one of the rules is: Class names should begin with an uppercase character (rule: Code Style-ClassNamingConventions) See: https://pmd.github.io/latest/pmd_rules_apex_codestyle.html#...