I can't find the name of the ::
operator added in Java 8 in either of the following resources:
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
It's described as a 'separator' in both #3.11 and #15.13.3.
As per here, it looks like it's called a method reference operator. It's covered in section 15.13 of the proposed JLS you link to.
However, as rightly pointed out, it appears to be never explicitly named as an operator (unlike all the things like
+
,-
and so on). Instead, the JLS simply refers to the entire expression containing::
as a method reference expression.It may be that this is because
::
is not considered to be an operator at all but is explicitly called out as a separator (see JLS link 3.11, while the operators are in 3.12).So I would tend to call it, in the context you're interested in, a method reference separator (or, more generally, the double-colon separator).
It should probably be called a "colon colon separator":
::
as a separator.*source: the road to lambda @ Javaone 2013 around 04:00.