词表 · 第 3 篇
Java
1. abstract
- 译:抽象的 | Java:用
abstract修饰的类或方法,类不可实例化、方法无方法体 - 例
- An abstract class cannot be instantiated. — 抽象类不能被实例化。
- Abstract methods have no body. — 抽象方法没有方法体。
- 地道:abstract base class(抽象基类)
- 短语:abstract class · abstract method · abstract keyword
2. aforementioned
- 译:上述的,前文提到的 | Java:技术文档中指代前文已说明的概念
- 例
- The aforementioned method throws IOException. — 上述方法会抛出 IOException。
- See the aforementioned example for details. — 详情参见前述示例。
- 地道:the aforementioned issue(前述问题)
- 短语:the aforementioned · the above-mentioned · as previously stated
3. application
- 译:应用,应用程序(Java 应用程序,通常以
main方法为入口) - 短语:application server · standalone application · deploy an application
4. appropriate
- 译:适当的,合适的 | Java:选择合适的 API、注解或访问级别
- 例
- Choose the appropriate exception type. — 选择合适的异常类型。
- Use the appropriate access modifier. — 使用合适的访问修饰符。
- 地道:deemed appropriate(认为合适)
- 短语:appropriate for · where appropriate · appropriate use
5. arithmetic
- 译:算术 | Java:算术运算符(+、-、*、/、%)或 ArithmeticException
- 例
- Division by zero throws ArithmeticException. — 除以零会抛出 ArithmeticException。
- Use arithmetic operators carefully on primitives. — 对基本类型谨慎使用算术运算符。
- 地道:arithmetic overflow(算术溢出)
- 短语:arithmetic operator · arithmetic exception · integer arithmetic
6. aspect
- 译:方面;切面 | Java:AOP 中的横切关注点,由 AspectJ 等实现
- 例
- Logging is a typical cross-cutting aspect. — 日志是典型的横切关注切面。
- An aspect weaves advice into join points. — 切面把通知织入连接点。
- 地道:cross-cutting concern(横切关注点)
- 短语:aspect-oriented · AspectJ aspect · declare an aspect
7. associate
- 译:关联,联系 | Java:把对象、键或注解与目标绑定
- 例
- Associate a key with a value in the map. — 在 map 中把键与值关联起来。
- Annotations are associated with declarations. — 注解与声明关联。
- 地道:associated with(与……相关联)
- 短语:associate X with Y · associated key · tightly associated
8. attribute
- 译:属性 | Java:JSP、XML 或注解元素中的属性;也指对象字段
- 例
- Set the session attribute before redirect. — 重定向前设置 session 属性。
- Each XML element may carry attributes. — 每个 XML 元素可以带属性。
- 地道:custom attribute(自定义属性)
- 短语:session attribute · attribute value · setAttribute
9. atomic
- 译:原子的 | Java:
java.util.concurrent.atomic包下不可分割、线程安全的操作 - 短语:AtomicInteger · atomic operation · compare-and-swap
10. buffer
- 译:缓冲区 | Java:NIO Buffer 或 I/O 中临时存放数据的容器
- 例
- Flip the buffer before reading. — 读取前翻转 buffer。
- A ByteBuffer stores bytes for channel I/O. — ByteBuffer 为 channel I/O 存储字节。
- 地道:flip the buffer(翻转缓冲区)
- 短语:ByteBuffer · buffer overflow · clear a buffer
11. cache
- 译:缓存 | Java:用于减少重复计算的临时存储,常见有 LRU、Caffeine 等
- 短语:cache hit · cache eviction · LRU cache
12. component
- 译:组件 | Java:Spring 中由容器管理的可注入 Bean
- 例
- Register the component with @Component. — 用 @Component 注册组件。
- Each component has a well-defined role. — 每个组件都有明确的职责。
- 地道:component scan(组件扫描)
- 短语:@Component · component scan · loosely coupled components
13. concurrent
- 译:并发的 | Java:
java.util.concurrent包提供并发编程工具 - 例
- ConcurrentHashMap is thread-safe. — ConcurrentHashMap 是线程安全的。
- Concurrent collections reduce lock contention. — 并发集合减少锁竞争。
- 地道:concurrent vs parallel(并发与并行)
- 短语:concurrent collection · ConcurrentMap · java.util.concurrent
14. conjunction
- 译:结合,联合 | Java:常用于 in conjunction with(与……一起使用)
- 例
- Use generics in conjunction with inheritance. — 将泛型与继承结合使用。
- Locks work in conjunction with conditions. — 锁与条件配合使用。
- 地道:in conjunction with(与……一起)
- 短语:in conjunction with · work in conjunction · conjunction of features
15. connection
- 译:连接(JDBC / 网络 / IO 连接)
- 短语:open a connection · close the connection · connection pool
16. constrain
- 译:约束,限制 | Java:通过泛型边界、
final、可见性等限制行为 - 例
- Generic bounds constrain type arguments. — 泛型边界约束类型参数。
- Constrain mutability with final. — 用 final 约束可变性。
- 地道:constrained by bounds(受边界约束)
- 短语:constrain a type · constrained generic · tightly constrained
17. context
- 译:上下文 | Java:Spring ApplicationContext、执行上下文等承载环境信息的对象
- 短语:ApplicationContext · context-aware · context initialization
18. correspond
- 译:对应 | Java:方法签名与接口方法对应、字段与列对应
- 例
- Each method corresponds to an interface operation. — 每个方法对应一个接口操作。
- The field corresponds to a database column. — 字段对应数据库列。
- 地道:corresponds to(对应于)
- 短语:correspond to · corresponding field · one-to-one correspondence
19. costly
- 译:昂贵的 | Java:指性能开销大,如频繁创建对象、反射调用等
- 例
- Reflection is comparatively costly. — 反射相对昂贵。
- Avoid costly operations in tight loops. — 避免在紧凑循环中执行昂贵操作。
- 地道:costly mistake(代价惨重的错误)
- 短语:costly operation · computationally costly · costly path
20. declared
- 译:声明的 | Java:在源码中已写出类型与名字的变量、方法或类
- 例
- The declared type is List
. — 声明类型是 List 。 - Only declared exceptions need handling. — 只有声明抛出的异常需要处理。
- The declared type is List
- 地道:declared exceptions(声明异常)
- 短语:declared type · declared exception · declared field
21. default
- 译:默认(Java 8 接口
default方法、默认访问级别、默认值) - 短语:default method · default constructor · default value
22. deliberate
- 译:故意的;深思熟虑的 | Java:刻意设计的选择,常与 decision 连用
- 例
- It was a deliberate design choice. — 这是有意的设计选择。
- Throwing UnsupportedOperationException is deliberate. — 抛出 UnsupportedOperationException 是刻意的。
- 地道:deliberate decision(深思熟虑的决定)
- 短语:deliberate choice · deliberate design · deliberate action
23. descriptor
- 译:描述符 | Java:字段描述符(JVM 字节码中如
I、Ljava/lang/String;) - 例
- The descriptor “I” stands for int. — 描述符 “I” 代表 int。
- Field descriptors appear in class files. — 字段描述符出现在 class 文件中。
- 地道:field descriptor(字段描述符)
- 短语:field descriptor · method descriptor · class descriptor
24. destructive
- 译:破坏性的 | Java:会修改对象状态或不可恢复的操作
- 例
- Avoid destructive in-place modifications. — 避免破坏性的就地修改。
- A destructive update overwrites the original. — 破坏性更新会覆盖原值。
- 地道:non-destructive update(非破坏性更新)
- 短语:destructive update · destructive read · non-destructive
25. deterministic
- 译:确定性的 | Java:相同输入产生相同输出,如 HashMap 遍历顺序则非确定性
- 短语:deterministic order · deterministic behavior · non-deterministic
26. equivalence
- 译:等价 | Java:对象等价由
equals决定,与==引用相等不同 - 例
- equals checks value equivalence. — equals 检查值等价。
- Override hashCode whenever equivalence changes. — 只要等价语义变化就要重写 hashCode。
- 地道:equivalence relation(等价关系)
- 短语:value equivalence · equivalence class · equivalent to
27. extend
- 译:扩展;继承 | Java:
extends关键字表示子类继承父类 - 例
- Subclasses extend the superclass with extends. — 子类用 extends 继承父类。
- Don’t extend classes not designed for inheritance. — 不要继承未为继承设计的类。
- 地道:extend vs implement(继承与实现)
- 短语:extends keyword · extend a class · extend functionality
28. external
- 译:外部的(外部库、外部配置、外部资源)
- 短语:external library · external configuration · external system
29. final
- 译:最终的(
final类不可继承、方法不可重写、变量不可重新赋值) - 短语:final field · final method · effectively final
30. flush
- 译:刷新 | Java:把缓冲区数据强制写入输出流或底层通道
- 例
- Call flush to push buffered bytes out. — 调用 flush 把缓冲字节推送出去。
- Don’t forget to flush before close. — 关闭前别忘了 flush。
- 地道:flush the stream(刷新流)
- 短语:flush a stream · flush the buffer · auto-flush
31. hierarchical
- 译:分层的,层级式的 | Java:类继承树、ClassLoader 父子关系等
- 例
- Class loaders form a hierarchical hierarchy. — 类加载器构成层级结构。
- Exceptions are hierarchical via extends. — 异常通过 extends 形成层级。
- 地道:hierarchical structure(层级结构)
- 短语:hierarchical class loader · hierarchical inheritance · hierarchical data
32. implements
- 译:实现 | Java:
implements关键字表示类实现一个或多个接口 - 例
- A class implements Runnable to run on a thread. — 类实现 Runnable 以在线程中运行。
- implements can list multiple interfaces. — implements 可列出多个接口。
- 地道:implements vs extends(实现与继承)
- 短语:implements Runnable · implements Comparable · implement an interface
33. impose
- 译:强加;施加 | Java:指语言或框架强制施加的约束
- 例
- Generics impose stricter type checks. — 泛型施加了更严格的类型检查。
- The framework imposes lifecycle rules. — 框架施加了生命周期规则。
- 地道:impose a constraint(施加约束)
- 短语:impose restrictions · impose constraints · impose limits
34. inconsistent
- 译:不一致的 | Java:状态、行为或文档前后矛盾
- 例
- Override equals and hashCode to avoid inconsistency. — 重写 equals 和 hashCode 以避免不一致。
- Inconsistent locking leads to races. — 不一致的加锁会导致竞争。
- 地道:inconsistent state(不一致状态)
- 短语:inconsistent state · inconsistent behavior · inconsistent data
35. indicating
- 译:表明,指示 | Java:注解或异常名表明某种状态
- 例
- A red icon indicating an error. — 红色图标表示错误。
- Annotations indicating nullability. — 表示可空性的注解。
- 地道:indicating that(表明……)
- 短语:indicating error · indicating status · indicating failure
36. instance
- 译:实例 | Java:用
new创建的对象,instanceof用于类型判断 - 例
- Each object is an instance of a class. — 每个对象都是某个类的实例。
- Use instanceof to check runtime type. — 用 instanceof 检查运行时类型。
- 地道:instance of(……的实例)
- 短语:instance field · instanceof · create an instance
37. interface
- 译:接口 | Java:抽象方法与常量的契约,支持多继承与
default方法 - 短语:implements interface · default method · functional interface
38. interpreted
- 译:解释执行的 | Java:常被误称”解释执行”,实为 JVM 即时编译
- 例
- Java bytecode is interpreted by the JVM. — Java 字节码由 JVM 解释执行。
- The hot code gets JIT-compiled, not just interpreted. — 热点代码会被 JIT 编译,而非仅解释。
- 地道:interpreted vs compiled(解释与编译)
- 短语:interpreted bytecode · interpreted language · JIT-compiled
39. iterator
- 译:迭代器 | Java:实现
Iterator接口,提供 hasNext / next 遍历 - 例
- An iterator walks through a collection. — 迭代器遍历集合。
- Call next only after hasNext returns true. — 只有 hasNext 返回 true 后才能调用 next。
- 地道:fail-fast iterator(快速失败迭代器)
- 短语:Iterator
· hasNext / next · fail-fast iterator
40. library
- 译:库 | Java:标准库(rt.jar / java.*)或第三方依赖(JAR)
- 短语:standard library · third-party library · import a library
41. malicious
- 译:恶意的 | Java:恶意输入、序列化攻击等安全议题
- 例
- Validate inputs to prevent malicious data. — 校验输入以防恶意数据。
- Deserialization can run malicious code. — 反序列化可能执行恶意代码。
- 地道:malicious input(恶意输入)
- 短语:malicious code · malicious payload · malicious user
42. manipulated
- 译:被操纵的;被修改的 | Java:数据被加工或对象被反射改动
- 例
- Bit values are manipulated with shifts. — 位值通过移位操作进行操纵。
- Reflection lets fields be manipulated at runtime. — 反射能在运行时修改字段。
- 地道:manipulated data(被处理的数据)
- 短语:bit manipulation · manipulated state · manipulated value
43. multicast
- 译:多播 | Java:DatagramChannel / MulticastSocket 中的组播通信
- 例
- Join a multicast group on a port. — 加入端口上的多播组。
- MulticastSocket receives group packets. — MulticastSocket 接收组内数据包。
- 地道:multicast group(多播组)
- 短语:MulticastSocket · multicast group · join multicast
44. notation
- 译:表示法,记法 | Java:泛型尖括号、Lambda 箭头、注解 @ 等写法
- 例
- Diamond notation <> infers type arguments. — 菱形记法 <> 推断类型参数。
- Lambda notation uses ->. — Lambda 写法使用 ->。
- 地道:diamond notation(菱形记法)
- 短语:diamond notation · method reference notation · array notation
45. object oriented
- 译:面向对象的 | Java:以封装、继承、多态为核心的范式
- 例
- Java is an object oriented language. — Java 是面向对象的语言。
- Object oriented design favors composition. — 面向对象设计偏好组合。
- 地道:object oriented programming(面向对象编程)
- 短语:object oriented programming · OOP principles · object oriented design
46. obsolete
- 译:过时的 | Java:被
@Deprecated标注的旧 API - 例
- The method is marked obsolete since Java 9. — 该方法自 Java 9 起被标记为过时。
- Replace obsolete APIs with new ones. — 用新 API 替换过时的 API。
- 地道:deprecated and obsolete(已废弃过时)
- 短语:obsolete method · obsolete API · @Deprecated
47. optimization
- 译:优化 | Java:JIT 编译器、字符串池等运行时与编译期优化
- 短语:JIT optimization · premature optimization · performance optimization
48. pointcut
- 译:切点 | Java:AspectJ 表达式定义的连接点集合,决定通知在何处生效
- 例
- A pointcut matches method executions. — 切点匹配方法执行。
- execution(* service.(..)) is a common pointcut. — execution( service.*(..)) 是常见切点。
- 地道:pointcut expression(切点表达式)
- 短语:pointcut expression · execution pointcut · declare pointcut
49. primitive
- 译:原始的;基本类型 | Java:8 种非对象类型(boolean/char/byte/short/int/long/float/double)
- 例
- int is a primitive type. — int 是基本类型。
- Primitives cannot be null. — 基本类型不能为 null。
- 地道:primitive vs wrapper(基本类型与包装类)
- 短语:primitive type · primitive value · primitive conversion
50. prohibit
- 译:禁止 | Java:语言规则不允许的行为,如泛型数组创建
- 例
- The compiler prohibits raw type warnings. — 编译器对原始类型给出警告。
- finalize prohibits throwing checked exceptions. — finalize 不允许抛出受检异常。
- 地道:prohibit X from doing(禁止 X 做……)
- 短语:prohibit use · strictly prohibit · prohibited operation
51. provider
- 译:提供者 | Java:SPI 中通过 ServiceLoader 加载的实现提供方
- 例
- Register a provider in META-INF/services. — 在 META-INF/services 中注册 provider。
- The JDBC provider supplies driver implementations. — JDBC provider 提供驱动实现。
- 地道:service provider(服务提供者)
- 短语:service provider · Provider API · SPI provider
52. reconstruct
- 译:重建 | Java:反序列化或反射重建对象图
- 例
- Reconstruct an object from its byte stream. — 从字节流重建对象。
- The stack trace is reconstructed on throw. — 抛出异常时重建栈轨迹。
- 地道:reconstruct the object graph(重建对象图)
- 短语:reconstruct state · reconstruct an object · reconstruct data
53. resource
- 译:资源 | Java:需要 try-with-resources 关闭的文件、流、连接等
- 短语:try-with-resources · resource leak · resource bundle
54. retrieve
- 译:检索,取回 | Java:从集合、数据库或缓存中取出数据
- 例
- Retrieve a value by key from the map. — 按 key 从 map 取值。
- The DAO retrieves rows from the database. — DAO 从数据库检索行。
- 地道:retrieve and update(检索并更新)
- 短语:retrieve data · retrieve by key · retrieve records
55. scanline
- 译:扫描线 | Java:图像处理或渲染中按行遍历像素
- 例
- The renderer processes one scanline at a time. — 渲染器一次处理一条扫描线。
- Each scanline holds one row of pixels. — 每条扫描线包含一行像素。
- 地道:scanline rendering(扫描线渲染)
- 短语:scanline algorithm · scanline rendering · per-scanline
56. schema
- 译:模式;结构 | Java:XML Schema、数据库 schema,或 JSON 结构定义
- 短语:XML schema · database schema · schema validation
57. sequence
- 译:序列(顺序、序列化流中字节序列)
- 短语:byte sequence · in sequence · sequence of events
58. serialize
- 译:序列化 | Java:实现 Serializable 把对象转换为字节流
- 短语:Serializable · serialize to bytes · deserialize
59. static
- 译:静态的 | Java:
static修饰的成员属于类而非实例 - 例
- A static field is shared by all instances. — 静态字段被所有实例共享。
- Static methods cannot use this. — 静态方法不能使用 this。
- 地道:static initializer(静态初始化块)
- 短语:static field · static method · static nested class
60. stipulation
- 译:规定,约定 | Java:JLS 或契约中的明确要求
- 例
- The JLS stipulation covers generics erasure. — JLS 规定涵盖泛型擦除。
- Honor the API stipulation on null inputs. — 遵守 API 对 null 输入的约定。
- 地道:by stipulation(按规定)
- 短语:legal stipulation · contract stipulation · JLS stipulation
61. synchronized
- 译:同步的 | Java:
synchronized关键字,对方法或代码块加内置锁 - 例
- A synchronized method holds the monitor. — 同步方法持有监视器锁。
- Use synchronized blocks to guard state. — 用 synchronized 块保护状态。
- 地道:synchronized block(同步块)
- 短语:synchronized method · synchronized block · intrinsic lock
62. thread
- 译:线程 | Java:
java.lang.Thread表示轻量级执行单元 - 短语:Thread.sleep · thread pool · main thread
63. underlying
- 译:底层的 | Java:集合背后的数组、框架背后的实现
- 例
- ArrayList wraps an underlying array. — ArrayList 包装了底层数组。
- Understand the underlying mechanism. — 理解底层机制。
- 地道:underlying array(底层数组)
- 短语:underlying array · underlying implementation · underlying stream
64. unsigned
- 译:无符号的 | Java:JDK 8+ 才以包装类静态方法支持无符号运算
- 例
- Java has no native unsigned int type. — Java 没有原生无符号 int 类型。
- Use Integer.parseUnsignedInt for unsigned. — 用 Integer.parseUnsignedInt 处理无符号。
- 地道:unsigned right shift(无符号右移 >>>)
- 短语:unsigned shift >>> · unsigned int · parseUnsignedInt
65. volatile
- 译:易变的;volatile 关键字 | Java:保证多线程可见性与有序性的轻量级同步
- 例
- volatile guarantees visibility across threads. — volatile 保证跨线程可见性。
- volatile does not provide atomicity for ++. — volatile 对 ++ 不保证原子性。
- 地道:volatile field(volatile 字段)
- 短语:volatile keyword · volatile read/write · happens-before
66. bytecode
- 译:字节码 | Java:javac 编译产生的平台无关中间指令
- 例
- javac compiles sources into bytecode. — javac 把源码编译成字节码。
- The JVM executes bytecode on each platform. — JVM 在各平台上执行字节码。
- 地道:bytecode instruction(字节码指令)
- 短语:Java bytecode · bytecode manipulation · bytecode verifier
67. classpath
- 译:类路径 | Java:JVM 查找类与资源的路径
- 例
- Add the JAR to the classpath. — 把 JAR 加入类路径。
- A missing classpath entry causes NoClassDefFoundError. — 缺失 classpath 项会引发 NoClassDefFoundError。
- 地道:on the classpath(在类路径上)
- 短语:set classpath · runtime classpath · classpath resource
68. comparable
- 译:可比较的 | Java:实现
Comparable<T>接口定义自然顺序 - 例
- Implement Comparable to define natural ordering. — 实现 Comparable 以定义自然顺序。
- The class is comparable by id. — 该类按 id 可比较。
- 地道:comparable vs comparator(内部比较与外部比较)
- 短语:Comparable
· compareTo · natural ordering
69. comparator
- 译:比较器 | Java:
Comparator<T>接口,提供外部排序策略 - 例
- Pass a Comparator to sort differently. — 传入 Comparator 以不同方式排序。
- Comparator.comparingInt is concise. — Comparator.comparingInt 简洁明了。
- 地道:custom comparator(自定义比较器)
- 短语:Comparator
· Comparator.comparing · reverse order
70. CompletableFuture
英 /kəmˈpliːtəbl fjuːˈtʃə(r)/ · 美 /kəmˈpliːtəbl fjuːˈtʃər/ · 🔊 英 美
- 译:可完成 Future | Java:JDK 8 引入的可链式异步编程原语
- 例
- CompletableFuture.supplyAsync runs tasks off-thread. — CompletableFuture.supplyAsync 异步执行任务。
- Chain futures with thenApply. — 用 thenApply 串联 Future。
- 地道:composable future(可组合的 Future)
- 短语:supplyAsync · thenApply · CompletableFuture.allOf
71. dependency injection
英 /dɪˈpendənsi ɪnˈdʒekʃn/ · 美 /dɪˈpendənsi ɪnˈdʒekʃn/ · 🔊 英 美
- 译:依赖注入 | Java:Spring 等容器把依赖自动注入到 Bean 中
- 例
- Spring handles dependency injection for you. — Spring 替你处理依赖注入。
- Constructor injection is preferred. — 构造器注入更受推荐。
- 地道:invert dependency(反转依赖)
- 短语:@Autowired · constructor injection · DI container
72. garbage collection
- 译:垃圾回收 | Java:JVM 自动回收不可达对象内存,常见 G1 / ZGC 等
- 短语:GC pause · G1 GC · out of memory
73. generic
- 译:泛型的 | Java:泛型类型
<T>提供编译期类型安全 - 短语:generic type · generic method · type parameter
74. heap
- 译:堆 | Java:JVM 内存区域,几乎全部对象在此分配
- 例
- Objects are allocated on the heap. — 对象分配在堆上。
- Tune -Xmx to resize the heap. — 调整 -Xmx 改变堆大小。
- 地道:on the heap(在堆上)
- 短语:heap memory · heap dump · heap overflow
75. JDK
- 译:缩写,Java Development Kit,Java 开发工具包
- 例
- Install JDK 21 LTS. — 安装 JDK 21 LTS。
- The JDK includes javac and a JRE. — JDK 包含 javac 与一个 JRE。
- 地道:LTS release(长期支持版本)
- 短语:JDK 21 · JDK release · bundled JDK
76. JRE
- 译:缩写,Java Runtime Environment,Java 运行时环境
- 例
- End users only need the JRE. — 终端用户只需 JRE。
- The JRE contains the JVM and core libraries. — JRE 包含 JVM 与核心库。
- 地道:JRE vs JDK(运行时与开发包)
- 短语:JRE only · bundled JRE · JRE version
77. JVM
- 译:缩写,Java Virtual Machine,Java 虚拟机,字节码的运行时
- 例
- The JVM runs bytecode anywhere. — JVM 在任何平台上运行字节码。
- Tune JVM options for throughput. — 为吞吐量调优 JVM 选项。
- 地道:write once, run anywhere(一次编写到处运行)
- 短语:JVM options · HotSpot JVM · JVM startup
78. lambda
- 译:Lambda 表达式 | Java:JDK 8 引入的简洁函数式写法
(x) -> x*2 - 例
- A lambda implements a functional interface. — Lambda 实现一个函数式接口。
- Use lambdas with the Stream API. — 把 Lambda 与 Stream API 一起使用。
- 地道:lambda expression(Lambda 表达式)
- 短语:lambda expression · functional interface · method reference
79. module
- 译:模块 | Java:JDK 9 引入的 JPMS 模块系统(
module-info.java) - 例
- A module declares its exports and requires. — 模块声明其 exports 与 requires。
- module-info.java defines the module. — module-info.java 定义模块。
- 地道:modular JAR(模块化 JAR)
- 短语:module-info.java · requires · exports
80. reflection
- 译:反射 | Java:
java.lang.reflect在运行时检查类型并调用成员 - 例
- Reflection can access private fields. — 反射可以访问私有字段。
- Reflection is slower than direct calls. — 反射比直接调用慢。
- 地道:reflection overhead(反射开销)
- 短语:java.lang.reflect · getDeclaredField · reflection API
81. runtime
- 译:运行时 | Java:程序执行期间,JVM 提供运行时环境
- 例
- Generics are erased at runtime. — 泛型在运行时被擦除。
- Class objects exist at runtime. — Class 对象在运行时存在。
- 地道:at runtime(在运行时)
- 短语:runtime type · runtime error · runtime overhead
82. stack
- 译:栈 | Java:每个线程有自己的方法调用栈,存储栈帧
- 例
- StackOverflowError occurs on deep recursion. — 深递归会引发 StackOverflowError。
- Local variables live on the stack. — 局部变量位于栈上。
- 地道:on the stack(在栈上)
- 短语:stack frame · StackOverflowError · call stack
83. stream
- 译:流 | Java:JDK 8 的 Stream API,对元素序列做函数式聚合
- 例
- A stream pipeline is lazy. — 流管线是惰性的。
- Collect the stream into a list. — 把流收集成 list。
- 地道:stream pipeline(流管线)
- 短语:Stream
· collect(toList()) · intermediate operation
84. type erasure
- 译:类型擦除 | Java:编译后泛型类型参数被移除,运行时只剩原始类型
- 例
- Type erasure removes generic info at runtime. — 类型擦除在运行时移除泛型信息。
- You can’t get T.class due to erasure. — 由于擦除无法获得 T.class。
- 地道:erased at runtime(运行时被擦除)
- 短语:generic erasure · erased type · runtime erasure