What does the term wrapper mean?
Developers often say: “I’m going to build a wrapper around this piece of code.”
What does it mean?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A wrapper is a very generic term, but it is commonly used to create a programmer-defined function or class around a primitive data type or built-in function.
This can be done for many reasons, but it’s typically to introduce another level of abstraction, so that changes to common functions or routines will only need to be made in one place.
e.g.
Integeris a wrapper for the primitive typeintin Java.You can also create a wrapper around a console print line statement like so: