Access modifiers (original) (raw)
Zugriffsmodifikatoren (engl. access specifier, access modifier oder kurz modifier) sind Schlüsselwörter in Programmiersprachen, die den Grad definieren, in dem Teile eines Programms auf andere Teile eines Programms (wie beispielsweise Variablen, Funktionen oder Klassen) zugreifen können. Sie regeln die Sichtbarkeit dieser Teile innerhalb eines Programms. Große Verbreitung finden sie nur in objektorientierten Sprachen, wenngleich es einige von ihnen auch in funktionalen Programmiersprachen gibt.
Property | Value |
---|---|
dbo:abstract | Access modifiers (or access specifiers) are keywords in object-oriented languages that set the accessibility of classes, methods, and other members. Access modifiers are a specific part of programming language syntax used to facilitate the encapsulation of components. In C++, there are only three access modifiers. C# extends the number of them to six, while Java has four access modifiers, but three keywords for this purpose. In Java, having no keyword before defaults to the package-private modifier. When the class is declared as public, it is accessible to other classes defined in the same package as well as those defined in other packages. This is the most commonly used specifier for classes. However, a class itself cannot be declared as private. If no access specifier is stated, the default access restrictions will be applied. The class will be accessible to other classes in the same package but will be inaccessible to classes outside the package. When we say that a class is inaccessible, it simply means that we cannot create an object of that class or declare a variable of that class type. The protected access specifier too cannot be applied to a class. (en) Zugriffsmodifikatoren (engl. access specifier, access modifier oder kurz modifier) sind Schlüsselwörter in Programmiersprachen, die den Grad definieren, in dem Teile eines Programms auf andere Teile eines Programms (wie beispielsweise Variablen, Funktionen oder Klassen) zugreifen können. Sie regeln die Sichtbarkeit dieser Teile innerhalb eines Programms. Große Verbreitung finden sie nur in objektorientierten Sprachen, wenngleich es einige von ihnen auch in funktionalen Programmiersprachen gibt. (de) Em programação orientada a objetos, modificador de acesso, também chamado de visão de método ou ainda visão de atributo, é a palavra-chave que define um atributo, método ou classe como público (ou public, qualquer classe pode ter acesso), privado (ou private, apenas os métodos da própria classe pode manipular o atributo) ou protegido (ou protected, pode ser acessado apenas pela própria classe ou pelas suas subclasses). Geralmente, utiliza-se modificadores de acesso para privar os atributos do acesso direto (tornando-os privados) e implementa-se métodos públicos que acessam e alteram os atributos. Tal prática pode ser chamada de encapsulamento. Métodos privados geralmente são usados apenas por outros métodos que são públicos (e que podem ser chamados a partir de outro objeto) da mesma classe a fim de não repetir código em mais de um método. (pt) |
dbo:wikiPageExternalLink | https://books.google.com/books%3Fid=XdHYaE-Il9gC%7Ctitle=C |
dbo:wikiPageID | 37340815 (xsd:integer) |
dbo:wikiPageLength | 5957 (xsd:nonNegativeInteger) |
dbo:wikiPageRevisionID | 1112198636 (xsd:integer) |
dbo:wikiPageWikiLink | dbr:Encapsulation_(computer_programming) dbr:Keyword_(computer_programming) dbr:C++ dbr:C_Sharp_(programming_language) dbr:Java_(programming_language) dbc:Programming_constructs dbr:Object-oriented_language |
dbp:wikiPageUsesTemplate | dbt:Citation dbt:Refimprove dbt:Reflist dbt:Sfn dbt:Short_description |
dct:subject | dbc:Programming_constructs |
gold:hypernym | dbr:Keywords |
rdf:type | yago:Abstraction100002137 yago:Cognition100023271 yago:Concept105835747 yago:Content105809192 yago:Idea105833840 yago:PsychologicalFeature100023100 yago:WikicatProgrammingConstructs |
rdfs:comment | Zugriffsmodifikatoren (engl. access specifier, access modifier oder kurz modifier) sind Schlüsselwörter in Programmiersprachen, die den Grad definieren, in dem Teile eines Programms auf andere Teile eines Programms (wie beispielsweise Variablen, Funktionen oder Klassen) zugreifen können. Sie regeln die Sichtbarkeit dieser Teile innerhalb eines Programms. Große Verbreitung finden sie nur in objektorientierten Sprachen, wenngleich es einige von ihnen auch in funktionalen Programmiersprachen gibt. (de) Access modifiers (or access specifiers) are keywords in object-oriented languages that set the accessibility of classes, methods, and other members. Access modifiers are a specific part of programming language syntax used to facilitate the encapsulation of components. In C++, there are only three access modifiers. C# extends the number of them to six, while Java has four access modifiers, but three keywords for this purpose. In Java, having no keyword before defaults to the package-private modifier. (en) Em programação orientada a objetos, modificador de acesso, também chamado de visão de método ou ainda visão de atributo, é a palavra-chave que define um atributo, método ou classe como público (ou public, qualquer classe pode ter acesso), privado (ou private, apenas os métodos da própria classe pode manipular o atributo) ou protegido (ou protected, pode ser acessado apenas pela própria classe ou pelas suas subclasses). (pt) |
rdfs:label | Zugriffsmodifikator (de) Access modifiers (en) Modificador de acesso (pt) |
owl:sameAs | freebase:Access modifiers yago-res:Access modifiers wikidata:Access modifiers dbpedia-bg:Access modifiers dbpedia-de:Access modifiers dbpedia-pt:Access modifiers dbpedia-vi:Access modifiers https://global.dbpedia.org/id/4LF17 |
prov:wasDerivedFrom | wikipedia-en:Access_modifiers?oldid=1112198636&ns=0 |
foaf:isPrimaryTopicOf | wikipedia-en:Access_modifiers |
is dbo:wikiPageRedirects of | dbr:Access_specifier dbr:Access_modifier dbr:Access_specifiers |
is dbo:wikiPageWikiLink of | dbr:Index_of_object-oriented_programming_articles dbr:Oak_(programming_language) dbr:Friend_class dbr:Dafny dbr:Access_specifier dbr:C++_classes dbr:Instance_variable dbr:Object–relational_database dbr:Struct_(C_programming_language) dbr:Access_modifier dbr:Access_specifiers |
is foaf:primaryTopic of | wikipedia-en:Access_modifiers |