Abbreviated form of Java getter/setter field methods -


im curious if there exists abbreviation form getter/setter methods of objects

simpleobject osimple = new simpleobject(); osimple.setcountervalue(osimple.getcountervalue() + 1); 

like 1 simple datatypes

int counter = 0; counter += 2; 

info

the getter/setter methods required.

addition

if there isn't language feature thats support idea, convenient way deal in context of , clean code?

as geert3 said there no shortcut setters/getters in java without accessing property directly.

in case simpleobject-class should have method increasecounter() , maybe increasecounterby(int add) (or add(int a)).


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -