- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
嗯,一切都在标题中......
我知道这两种形式都引用了该方法,但我看不到 #
添加到另一种形式的内容。
最佳答案
哈希字符 (#) 不是 Java 语言的一部分。
它在 javadoc 中有特殊用途。 specification州
package.class#member is any valid program element name that is referenced -- a package, class, interface, constructor, method or field name -- except that the character ahead of the member name should be a hash character (#).
和
As stated, the hash character (#), rather than a dot (.) separates a member from its class. This enables the Javadoc tool to resolve ambiguities, since the dot also separates classes, nested classes, packages, and subpackages. However, the Javadoc tool is generally lenient and will properly parse a dot if you know there is no ambiguity, though it will print a warning.
该表示法不仅适用于方法,它适用于任何类型成员。它有助于消除完全限定类型名称中的歧义。
关于java - MyType#myMethod() 中的 "#"是什么意思以及与 MyType.myMethod() 中的 "."的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24354882/
我在为自定义类型的 ObservableCollection 创建扩展方法时遇到问题。我需要创建的扩展方法是“ToAnotherType”类型(如 ToList、ToArray)。 MyPoint 示
所以基本上我有这个方法。 public List FilterCustomersByStatus(List source, string status) { return (List)sour
我在 Clojure 中使用 deftype 时遇到了问题。如果我运行以下代码: (defprotocol TestProt (geta [this]) (getb [this])) (def
给定以下类: public class MyType { public static implicit operator MyType(Func wrapper) { retu
我定义了一个简单的代数(具体)数据类型,MyType: data MyTpe = MyBool Bool | MyInt Int ...我正在尝试找到一种方法将任意函数(a->b)“转换”为关联的(M
我有一个在运行时动态创建新类型的应用程序,创建该类型的对象并将它们插入 object 类型的 MongoDB 数据库集合中。使用 shell 我可以看到对象被正确插入并且 _t 值是动态创建的类的正确
与仅使用 List(Of MyType) 相比,使用 ConcurrentBag(Of MyType) 有什么优势? The MSDN page on the CB指出 ConcurrentBag(O
我想通过使用map一对一地从异步函数中加载多个描述: Future> loadDescriptions(List questions) async { Iterable> iterable
我想在线程之间传递一些信息。原子听起来像是要使用的东西。我看了一下this 。并发现一个简单的结构,例如 struct MyType{ int val_a,val_b; float vals_
我得到的具体异常是: Unable to cast object of type NbtByte to type INbtTag 在这一行: tag = (INbtTag)new NbtByte(st
是的,我已经完成了标题相似的问题。它们似乎都不符合我所处的情况。这只是程序员向 View 发送了错误的对象类型。 这是我收到的确切错误消息: The model item passed into th
这是一个玩具示例: #[derive(Debug)] struct Int { v: i32, } #[derive(Debug)] struct Double { v: f64, }
在我没有编写但必须使用的代码中,使用 OpenCV(但它可以是任何东西)我遇到了类似的东西: void foo (long addrImage){ [...] Mat& image = *(M
我有一个自定义列表 MyList,它是 List 的扩展,并且我有一个我想执行的 IEnumerable(或 IQueryable).ToList( ) 上,但我猜,.ToMyList()。 如何实现
[Test] public void testMultiplication() { var five=new Dollar(5); Assert.AreEqual(new Dollar
假设我有一个类 MyType: sealed class MyType { static Type typeReference = typeof(MyType); //... } 给定
我有一个如下所示的 ArrayList: final List myList = new ArrayList<>(); MyType 看起来像这样: public class MyType {
我正在使用来自不同模块的类型,我们将其称为 OtherModule.MyType, 这段代码: var a = [OtherModule.MyType]() 将产生错误无效使用“()”来调用非函数类型
我在下面列出了一个相当人为的例子,来 self 正在研究的更大的东西。我遇到了我认为是关于使用 Any 类型的 Swift 编译器错误。 struct Labelable { let t: T
我正在使用 Dictionary在一个类(class)。该类实现了一个需要 IList 的接口(interface)被退回。有没有一种简单的方法可以将一个转换为另一个(无需复制整个内容)? 我目前的解
我是一名优秀的程序员,十分优秀!