• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can implicit setters be created as private access instead of public?

Enthusiast ,
Oct 27, 2013 Oct 27, 2013

Copy link to clipboard

Copied

I love CF10's auto generation of accessors, but in the event I wanted to create a Read-Only bean, I'm noticing that when I dump the getMetaData() on the object, that the setProperty() methods are set to Public Access.

Does this mean that in order to have Private Access setters I have to tell the component: setter="false" on each property and then manually create a setProperty() method?

I'd like to be able to just say: setName( 'value' ) in my code inside the CFC, but not have objectName.setName( 'value' ) accessible from other parts of the application.

Views

294

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation
Resources
Documentation