JLS:https://docs.oracle.com/javase/specs/jls/se7/html/jls-6.html#jls-6.2

Not all identifiers in a program are a part of a name. Identifiers are also used in the following situations:

(1)In declarations (§6.1), where an identifier may occur to specify the name by which the declared entity will be known.

(2)As labels in labeled statements (§14.7) and in break andcontinue statements (§14.15§14.16) that refer to statement labels.

(3)In field access expressions (§15.11), where an identifier occurs after a "." token to indicate a member of an object that is the value of an expression or the keyword super that appears before the "." token

  

  

(4)In some method invocation expressions (§15.12), where an identifier may occur after a "." token and before a "(" token to indicate a method to be invoked for an object that is the value of an expression or the keyword super that appears before the "." token

(5)In qualified class instance creation expressions (§15.9), where an identifier occurs immediately to the right of the leftmost new token to indicate a type that must be a member of the compile-time type of the primary expression preceding the "." preceding the leftmost new token.

1、Primary Expressions

Primary:
    PrimaryNoNewArray
    ArrayCreationExpression

PrimaryNoNewArray:
    Literal
    Type . class
    void . class
    this
    ClassName . this
    ( Expression )
    ClassInstanceCreationExpression
    FieldAccess
    MethodInvocation
    ArrayAccess

15.8.1. Lexical Literals

Literal:
    IntegerLiteral
    FloatingPointLiteral
    BooleanLiteral
    CharacterLiteral
    StringLiteral
    NullLiteral

15.8.2. Class Literals

class TC<T>{
	public void test(){
		//Object t = T.class; // error
		Class<ArrayList> l = ArrayList.class;
		// Class<ArrayList> l = ArrayList<String>.class; // error
		Class<Integer> o = int.class;
		Class<Void> v = void.class;

	}
}

 

15.8.3. this

15.8.4. Qualified this

15.8.5. Parenthesized Expressions

2、Field Access Expressions

FieldAccess:
    Primary . Identifier
    super . Identifier
    ClassName . super . Identifier

3、Method Invocation Expressions

MethodInvocation:
    MethodName ( ArgumentListopt )
    Primary . NonWildTypeArgumentsopt Identifier ( ArgumentListopt )
    super . NonWildTypeArgumentsopt Identifier ( ArgumentListopt )
    ClassName . super . NonWildTypeArgumentsopt Identifier ( ArgumentListopt )
    TypeName . NonWildTypeArguments Identifier ( ArgumentListopt )

3.1、ArgumentList

ArgumentList:
    Expression
    ArgumentList , Expression

  

4、Class Instance Creation Expressions

ClassInstanceCreationExpression:
    new TypeArgumentsopt TypeDeclSpecifier TypeArgumentsOrDiamondopt
                          ( ArgumentListopt ) ClassBodyopt
    Primary . new TypeArgumentsopt Identifier TypeArgumentsOrDiamondopt
                          ( ArgumentListopt ) ClassBodyopt

TypeArgumentsOrDiamond:
    TypeArguments
    <> 

ArgumentList:
    Expression
    ArgumentList , Expression

  

Names and Identifiers的更多相关文章

  1. Chapter 6. Names

    6.2. Names and Identifiers A name is used to refer to an entity declared in a program. There are two ...

  2. bluetooth service uuid

    转自:https://www.bluetooth.com/specifications/assigned-numbers/service-discovery service discovery ​​​ ...

  3. IE6 IE7 IE8 的函数声明和函数表达式的实现与其他浏览器有差异

    标准参考 函数声明和函数表达式 定义一个函数有两种途径:函数声明和函数表达式. 函数声明: function Identifier ( FormalParameterList opt ) { Func ...

  4. esriFeatureType与esriGeometryType的区别与联系

    esriFeatureType通常用来表示数据的存储结构,即物理层: esriGeometryType通常用来表示数据的几何形状,即表现层. esriGeometryType枚举类型详解 常量 值 对 ...

  5. Using the EventManager

    Using the EventManager This tutorial explores the features of zend-eventmanager in-depth. Terminolog ...

  6. python27读书笔记0.1

    --Notes: 测试环境:Windows ,python 2.7.3,python 自带的IDLE #-*- coding: utf-8 -*- # First Lesson# --- Line s ...

  7. Bayeux协议

    Bayeux 协议-- Bayeux 1.0草案1 本备忘录状态 This document specifies a protocol for the Internet community, and ...

  8. The Go Programming Language. Notes.

    Contents Tutorial Hello, World Command-Line Arguments Finding Duplicate Lines A Web Server Loose End ...

  9. 像职业选手样编码:地道Python

    Code Like a Pythonista: Idiomatic Python David Goodger goodger@python.org http://python.net/~goodger ...

随机推荐

  1. B-tree B+tree B*Tree

    具体讲解之前,有一点,再次强调下:B-树,即为B树.因为B树的原英文名称为B-tree,而国内很多人喜欢把B-tree译作B-树,其实,这是个非常不好的直译,很容易让人产生误解.如人们可能会以为B-树 ...

  2. Win7_Ultimate + VS2010 + openGL_MFC单文档应用开发框架搭建步骤

    Win7_Ultimate + VS2010 + openGL单文档应用开发框架搭建步骤 上一个配置是基于OpenGL的开发工具配置的,下面就是基于Vs2010的MFC单文档应用开发. 通过网上查找资 ...

  3. hdu 2190 悼念512汶川大地震遇难同胞——重建希望小学

    题目 这道题拿到的时候拼凑了一会,感觉挺难的,然后博客说是:递推,我觉得递推其实就是找规律. 这是别人的思路:对于n米的长度,可以是由n-1长度加1而来,对于增加的1,只有三块1*1的砖一种铺法: 还 ...

  4. Ansible配置文件

    官方配置文件文档 Ansible安装完成之后默认配置文件为:/etc/asnible/ansible.cfg Ansible配置文件内容: cat ansible.cfg # config file ...

  5. EBS获取附件URL

    http://wenku.baidu.com/link?url=MnYX269RBqW9ZRh-4famwduhYq9As0-vsIyVPA7aqv64cdxxjZEOaEE1_KZ9SGjY9qCx ...

  6. nginx backend 健康检查

    ngx_http_proxy_module 模块和ngx_http_upstream_module模块(自带) 严格来说,nginx自带是没有针对负载均衡后端节点的健康检查的,但是可以通过默认自带的n ...

  7. TFS实战培训 - 博时基金公司 (2016年8月)

    博时基金管理有限公司是中国内地首批成立的五家基金管理公司之一, 是目前我国资产管理规模最大的基金公司. 博时信息技术部的的软件研发团队是负责公司信息化的核心技术部门,为提升软件产品的研发效率和质量,计 ...

  8. Hello World! 我的程序员入坑之旅!

    先说下本文标题,各行各业都有自己的行规和一些内行人玩的梗什么的,这是我开始写技术博客的第一篇,所以它的标题毫无疑问只能是Hello World! 介绍一下我自己 我算是一个少见的科班出身的开发者了,1 ...

  9. HDU4622 Reincarnation

    题目链接:戳我 因为对应的很多询问,所以我们一定要将每一种询问先处理出来,然后O(1)查询. 至于怎么处理出来子串的子串呢? 我们固定左端点,然后依次加入子串即可.然后统计的时候直接统计last那一个 ...

  10. linux 中定时执行python脚本

    一.让Python随Linux开机自动运行 准备好要自启的脚本auto.py 用root权限编辑以下文件 sudo vim /ect/rc.local 在exit 0上面编辑启动脚本的命令(编辑rc. ...