连击 天
fork: star:
class HeavyClass{ } inline fun api() = lazy { println("api initialised") HeavyClass() } class SomeClass { private val service by api() fun accessObject() {......
今天有人在群里问kotlin支持SAM的问题,其实kotlin不支持SAM,因为人家支持FP(function programing) package react interface Test { fun print() } class TestInterface(var test: Test)...
PECS 现在问题来了:我们什么时候用extends什么时候用super呢?《Effective Java》给出了答案: PECS: producer-extends, consumer-super 比如,一个简单的Stack API: public class Stack{ ...
最近看源码遇到一句话 public inline fun String.format(vararg args: Any?): String = java.lang.String.format(this, *args) 其中的*args让人一脸懵逼, 一上来还以为是指针 后来和群里讨论...
package com.ted.testcase import android.text.TextUtils import android.util.Log import com.ted.android.utils.TedSDKLog import com.ted.testcase.bean.Sms import java.io.File import...
sfshine: 我的测试工程: http://note.youdao.com/noteshare?id=961d1921566eb877985d55a4f2c01070 JavaRegex.java(Java中的正则表达式) public class JavaRegex { public static void ...
原版插件是 ASM Bytecode Outline. 这款插件翻译成字节码指令,看起来比较晕.个人改了一个版本(没有提交到 JB 仓库,需要自己去 github 下载),加入了 cfr decompile 选项,看起来更加清晰. 举个...
最近刚刚接触Kt,, 昨天使用Kt的时候遇到构造函数中 val var 使用的一个问题, 虽然昨天功能完成了, 但是还是有些糊涂, 为避免以后再遇到此类问题导致浪费时间, 现把原理介绍一下. 需求: 有一个...
Introduction 1.Hello, world! Simple Functions Take a look at function syntax and make the function start return the string "OK". In the tasks the function TODO() is used that th...
为什么使用Kotlin 项目一期在收尾了终于有时间折腾了,一个多月以来Kotlin从入门到现在,坚持用来开发的切身感受。因为语法与Java的区别挺大的一开始很想放弃,如果不是因为项目在使用,想必...
没有更多内容
加载失败,请刷新页面
没有更多内容
文章删除后无法恢复,确定删除此文章吗?
动弹删除后,数据将无法恢复
评论删除后,数据将无法恢复