Questions tagged [access-levels]

Access level modifiers determine whether other classes can use a particular field or invoke a particular method.

85 questions
0
votes
1 answer

Google AdWords account permissions via api

This question is for those who are working with Google AdWords. In Google AdWords, we have these account permissions Is there any way to check if a user has read-only, standard or admin permissions via API? In ManagedCustomerService we have…
0
votes
2 answers

Displaying levels of access for different types of accounts in a UML diagram

Pardon the title, it's a bit hard to properly explain what I need help with, but I'll give it a go. I'm working on a Java project, an order management application. I've got several classes for the different types of functionalities in the…
0
votes
0 answers

How to test private/internal extension methods?

I have an internal extension method: @VisibleForTesting internal fun URL.normalizeUrl() {some code not related to this question} I want to test this method in a JUnit test val normalizedUrl = someUrl.normalizeUrl() But the method is invisible for…
hc0re
  • 1,806
  • 2
  • 26
  • 61
0
votes
2 answers

Dealing with allowed commands per access level?

I have a set of commands like: .kick .unban .ban .unvouch .vouch .add .del .say Those commands are used in a chat room where I have several users with different access, for example: Admin is allowed to use all commands. Moderator is allowed to…
Guapo
  • 3,446
  • 9
  • 36
  • 63
0
votes
1 answer

What is the use-case for Private Protected members in VB.NET 15.5?

VB.NET 15.5 introduced an additional access level for class members: Private Protected, as documented here and here. An example is given as Private Protected internalValue As Integer My understanding is that this should be equivalent to just…
Jens
  • 6,275
  • 2
  • 25
  • 51
0
votes
2 answers

Changing a private variable inside child class

I understand that a private protection level is meant to stop any child accessing private parent variables. But isn't there a way to do it with accessors and mutators(get and set)? I have to have some kind of way to change a private string because…
Jeffrey Jordan
  • 135
  • 1
  • 9
0
votes
1 answer

How do you prevent referencing program from accessing classes directly? (.NET)

I most likely didn't describe my Title correctly and am totally lacking the terminology for what I'm trying to do... so if you are reading this and know what I should be asking for.. please share. So here is my issue. I am creating a DLL. This DLL…
da_jokker
  • 954
  • 2
  • 12
  • 16
0
votes
2 answers

Accessing a private method in a overridden public method

I am currently having some issues with accessing a private method from a overriden public method. My situation is like this: I have a compiled .dll file which consist basically of this public class OriginalHandler { public virtual void…
anita
  • 193
  • 10
0
votes
1 answer

Intellij IDEA give a 'Access can be private' warning for @Bean

I am using the latest IntelliJ IDEA free version (2018.1 build july 11.2018). The code analysis gives me a warning: 'Access can be private' on the method decorated with @Bean. I searched this problem, but all of answer suggested me to disable this…
Lang
  • 943
  • 13
  • 33
0
votes
3 answers

can we define a method in parent class which can be called within a child but not the other one

i ran into into a problem , i want to have a method(M) in a parent class (A) then B and C extend the class A . in this situation i want method(M) can be accessible by B but not C . any solution? public class A { ????? string M() { …
0
votes
1 answer

Access levels of custom initializers in Swift 3.1

Quote from The Swift Programming Language (Swift 3.1): Custom initializers can be assigned an access level less than or equal to the type that they initialize. The only exception is for required initializers (as defined in Required Initializers). A…
Robo Robok
  • 21,132
  • 17
  • 68
  • 126
0
votes
1 answer

Mixing edit access levels within the same mediawiki

I have my own mediawiki (running on a LAMP stack on an Ubuntu machine). Some pages constitute my own scratchpad / diary. I don't want other people to edit them. Other pages I would like to allow and encourage community editing. However I don't want…
P i
  • 29,020
  • 36
  • 159
  • 267
0
votes
0 answers

How can events be handled when the class is static?

Suppose you have the following class public class Message : Control, IDisposable { internal static class _Text : RichTextBox { protected override void OnLinkClicked( LinkClickedEventArgs e ) { …
Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
0
votes
1 answer

Unit test faces NullReferenceException when try to access a private accessor

In the main application: namespace ConsoleApplication1 { public class Patient { ... public double height { get; private set; } And in unit test: Patient p1=new Patient(); BindingFlags flags=BindingFlags.Instance |…
zahmati
  • 1,261
  • 1
  • 10
  • 18
0
votes
1 answer

How to specify recipients of messages in Pusher?

I have an app under Laravel that uses Pusher for real-time notification. My problem is, I want to filter the recipient of the message. I only want the administrators who logged-in to receive or view the notification sent by Pusher. Other users that…
Jay Marz
  • 1,861
  • 10
  • 34
  • 54