mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-18 23:28:18 +00:00
22 lines
566 B
Markdown
22 lines
566 B
Markdown
---
|
|
layout: pattern
|
|
title: Property
|
|
folder: property
|
|
permalink: /patterns/property/
|
|
categories: creational
|
|
tags: pattern_tag
|
|
---
|
|
|
|
**Intent:** Create hierarchy of objects and new objects using already existing
|
|
objects as parents.
|
|
|
|

|
|
|
|
**Applicability:** Use the Property pattern when
|
|
|
|
* when you like to have objects with dynamic set of fields and prototype inheritance
|
|
|
|
**Real world examples:**
|
|
|
|
* [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) prototype inheritance
|