PropertyPermission类的getActions()方法 (PropertyPermission Class getActions() method)

  • getActions() method is available in java.util package.

    getActions()方法在java.util包中可用。

  • getActions() method is used to get the list of current actions in the form of string denotation.

    getActions()方法用于以字符串表示形式获取当前动作的列表。

  • getActions() method is a non-static method, it is accessible with the class object only and if we try to access the method with the class name then we will get an error.

    getActions()方法是一种非静态方法,只能通过类对象访问,如果尝试使用类名称访问该方法,则会收到错误消息。

  • getActions() method does not throw an exception at the time of getting a set of actions.

    getActions()方法在获取一组操作时不会引发异常。

Syntax:

句法:

    public String getActions();

Parameter(s):

参数:

  • It does not accept any parameter.

    它不接受任何参数。

Return value:

返回值:

The return type of the method is String, it retrieves the string denotations of the actions.

该方法的返回类型为String ,它检索动作的字符串表示形式。

Example:

例:

// Java program to demonstrate the example
// of String getActions() method of
// PropertyPermission
import java.util.*;
public class GetActionsOfPropertyPermission {public static void main(String arg[]) {// Instantiates two PropertyPermission object
PropertyPermission prop_perm1 = new PropertyPermission("os.version", "write");
PropertyPermission prop_perm2 = new PropertyPermission("os.name", "read");
// By using getActions() method is to
// returns the action on at the property
// on the objects prop_perm1, prop_perm2
String action1 = prop_perm1.getActions();
String action2 = prop_perm2.getActions();
// Display action on prop_perm1
System.out.print("prop_perm1.getActions(): ");
System.out.println(action1);
// Display action on prop_perm2
System.out.print("prop_perm2.getActions(): ");
System.out.println(action2);
}
}

Output

输出量

prop_perm1.getActions(): write
prop_perm2.getActions(): read

翻译自: https://www.includehelp.com/java/propertypermission-getactions-method-with-example.aspx

Java PropertyPermission getActions()方法与示例相关推荐

  1. filepermission java,Java FilePermission getActions()方法与示例

    FilePermission类getActions()方法getActions()方法在java.io包中可用. getActions()方法用于检查此FilePermission和给定对象在路径名和 ...

  2. Java IOUtils.copy方法代码示例(亲测)

    本文整理汇总了Java中org.apache.commons.io.IOUtils.copy方法的典型用法代码示例.如果您正苦于以下问题:Java IOUtils.copy方法的具体用法?Java I ...

  3. java user directory,Java ProcessBuilder directory()方法与示例

    语法:public File directory (); public ProcessBuilder directory (File dir); ProcessBuilder类directory()方 ...

  4. Java序列化魔术方法及其示例使用

    在上一篇文章中, 您需要了解有关Java序列化的所有知识 ,我们讨论了如何通过实现Java序列化来启用类的可序列化性. Serializable接口. 如果我们的类未实现Serializable接口, ...

  5. catalog java,Java Connection getCatalog()方法与示例

    通常,目录是一个目录,其中包含有关数据集,文件或数据库的信息.而数据库目录中包含所有数据库,基本表,视图(虚拟表),同义词,值范围,索引,用户和用户组的列表. Connection接口的getCata ...

  6. java方法参数Bundle,Java ResourceBundle keySet()方法及示例

    ResourceBundle类keySet()方法keySet()方法在java.util包中可用. keySet()方法用于从此ResourceBundle及其超级捆绑包中获取所有现有键,以在Set ...

  7. java exec waitfor,Java Process waitFor()方法与示例

    流程类waitFor()方法在java.lang包中提供了waitFor()方法. waitFor()方法用于使当前正在运行的线程在需要时等待,直到由该Process对象表示的进程完成其终止为止. 当 ...

  8. java arraylist.add(),Java ArrayList add()方法与示例

    ArrayList类add()方法 语法:public boolean add(T ele); public void add(int indices, T ele);add()方法在java.uti ...

  9. java rollback用法,Java Connection rollBack()方法与示例

    回滚操作将撤消当前事务所做的所有更改,即,如果调用Connection接口的rollBack()方法,则所有修改都将还原到最后一次提交. 您还可以通过将所需的Savepoint对象作为参数传递给此方法 ...

最新文章

  1. ubuntu18.04上安装TensorFlow2.0
  2. 前端每周清单第 50 期: AngularJS and Long Term Support, Web 安全二三论
  3. ThinkPhp学习06
  4. LeetCode移掉k位数字(贪心算法)python
  5. 厚积薄发,丰富的公用类库积累,助你高效进行系统开发(11)---各种线程相关操作类...
  6. linux高亮查找关键字
  7. 28. JavaScript 库
  8. C语言习题答案【3】(仅参考)
  9. M2提示加载客户端版本信息失败的解决办法
  10. Android 360分包,如何安装分包app安装包
  11. 向量运算(点积,叉积)
  12. 利用android monkey 抢支付宝红包
  13. python采集原神高清pv图和语音
  14. matlab 离散频域分析,离散系统频域分析及matlab实现.doc
  15. 五五开周刊(第4期):星链会改变游戏规则吗?
  16. [转载]走近 Jazzy
  17. 20160119001 “饿了么”的艰难城市扩张之路
  18. 1978年,75位诺贝尔奖获得者在巴黎聚会。有人问其中一位:“你在哪所大学、哪所实验室里学到了你认为最重要的东西呢?”
  19. 信号与系统(Python) 学习笔记摘录 (3) LTI 系统 与 滤波器
  20. js如何判断字符是中文,英文,数字还是字符

热门文章

  1. python label标签的作用_label标签的作用是什么?
  2. linux 看防火墙的启停日志,LINUX下防火墙iptables的日志管理
  3. css黑色字白色描边,css怎么设置字体白色描边
  4. 多主机推送公钥、修改配置、修改密码脚本
  5. 为了让你的网页能在更多的服务器上正常地显示,还是加上“SET NAMES UTF8”吧
  6. Docker使用Dockerfile构建简单镜像
  7. 面向视频的全新AI架构 —— 阿里云智能视觉技术全解
  8. Promise进阶——如何实现一个Promise库
  9. Vue CLI 3 可以使用 TypeScript 生成新工程
  10. 微软披露了Spartan中所使用的渲染引擎的细节