JAVA 应用与开发 - 高级类特性现�����的方法��为抽象方法� 抽象方法������abstract��� ��抽象方法的类����为抽象类�����abstract��� CODE ± 抽象类示例 1 public abstract class Animal { //定义为抽象类 2 private int age; 4 public void setAge(int age) { 5 this.age = age; 6 } 8 return age; 10 } 12 public abstract void eat(); //抽象方法 13 } 4 29 ����类 CODE ± 抽象类继承 1 public class Person extends Animal { 2 private String name; 3 public void setName(String name) { 4 this.name } 9 public void eat() { //重写方法 10 System.out.println("��→��→���→��→���"); 11 } 12 } 1 public class Bird extends Animal { 2 public void fly(){ 3 System.out.println("我���!"); 4 } 5 public void eat(){0 码力 | 61 页 | 677.55 KB | 1 年前3
Java 应用与开发 - 类加载和反射个 时候就必须用到反射——运行时动态加载需要加载的对象。 一个例子 Struts2 框架开发中会在 struts.xml 里配置 Action 1class="ouc.j2ee.action.LoginAction" method="execute"> 2 index.jsp 3class 属性创建 LoginAction 的实例,并用 invoke 方法来调用 execute 方法。 这个过程是基于 Java 反射框架完成的。 大纲 反射 类的加载、连接和初始化 类加载器 使用反射生成并操作对象 本节习题 反射的主要用途 O 依赖注入 有两个组件 A 和 B,A 依赖于 B。 1 public class A { 2 public setB() 方法: 1 public class A { 2 private B b; 3 public void importantMethod() { 4 b.usefulMethod(); 5 ... 6 } 8 public void setB(B b) { 9 this.b = b; 10 } 11 } 1 class="ouc.j2ee.sample 0 码力 | 46 页 | 714.40 KB | 1 年前3
Apache ShardingSphere 中文文档 5.0.01:通过读取系统参数注入 APM 系统提供的 Tracer 实现类 启动时添加参数 -Dorg.apache.shardingsphere.tracing.opentracing.tracer.class=org.apache.skywalking. apm.toolkit.opentracing.SkywalkingTracer 调用初始化方法 4.5. 分布式治理 51 Apache ShardingSphere URL_VERSION: "/api/v2/spans" #zipkin 服务的抓取 span 的 uri Opentracing: props: OPENTRACING_TRACER_CLASS_NAME: "org.apache.skywalking.apm.toolkit. opentracing.SkywalkingTracer" OpenTelemetry: props: shardingsphere.datasource.names=ds0,ds1 # 配置第 1 个数据源 spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.jdbc.Driver0 码力 | 385 页 | 4.26 MB | 1 年前3
Apache ShardingSphere 中文文档 5.0.0-alpha1:通过读取系统参数注入 APM 系统提供的 Tracer 实现类 启动时添加参数 -Dorg.apache.shardingsphere.tracing.opentracing.tracer.class=org.apache.skywalking. apm.toolkit.opentracing.SkywalkingTracer 调用初始化方法 ShardingTracer.init(); shardingsphere.datasource.names=ds0,ds1 # 配置第 1 个数据源 spring.shardingsphere.datasource.ds0.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.jdbc.Driver datasource.ds1.type=com.zaxxer.hikari.HikariDataSource spring.shardingsphere.datasource.ds1.driver-class-name=com.mysql.jdbc.Driver spring.shardingsphere.datasource.ds1.jdbc-url=jdbc:mysql://localhost:3306/ds10 码力 | 301 页 | 3.44 MB | 1 年前3
Kotlin 1.9.10 官方文档 中文版
function is still supported, but we recommend that you use the entries property instead. enum class Color(val colorName: String, val rgb: String) { RED("Red", "#FF0000"), ORANGE("Orange", with sealed hierarchies (like a sealed class or sealed interface hierarchy), because data object declarations can be used conveniently alongside data class declarations. In this example, declaring maintains symmetry with the accompanying data class definitions. sealed interface ReadResult data class Number(val number: Int) : ReadResult data class Text(val text: String) : ReadResult data object0 码力 | 3753 页 | 29.69 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.1Reading table information for completion of table and column names │Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A "/api/v2/spans" SAMPLER_TYPE: "const" SAMPLER_PARAM: "1" OpenTracing: props: OPENTRACING_TRACER_CLASS_NAME: "org.apache.skywalking.apm.toolkit. opentracing.SkywalkingTracer" OpenTelemetry: props: sphere-agent.jar \ 4.10. 可观察性 64 Apache ShardingSphere document, v5.1.1 -classpath ${CLASS_PATH} ${MAIN_CLASS} >> ${STDOUT_FILE} 2>&1 & • 启动插件 通过改造后的 ShardingSphere‐Proxy 的启动脚本启动。 bin/start.sh 正常启动可以在对应的0 码力 | 409 页 | 4.47 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.0Reading table information for completion of table and column names │Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A "/api/v2/spans" SAMPLER_TYPE: "const" SAMPLER_PARAM: "1" OpenTracing: props: OPENTRACING_TRACER_CLASS_NAME: "org.apache.skywalking.apm.toolkit. opentracing.SkywalkingTracer" OpenTelemetry: props: sphere-agent.jar \ 4.10. 可观察性 63 Apache ShardingSphere document, v5.1.0 -classpath ${CLASS_PATH} ${MAIN_CLASS} >> ${STDOUT_FILE} 2>&1 & • 启动插件 通过改造后的 ShardingSphere‐Proxy 的启动脚本启动。 bin/start.sh 正常启动可以在对应的0 码力 | 406 页 | 4.40 MB | 1 年前3
Kotlin 官方文档中文版 v1.9supported, but we recommend that you use the entries property instead. Kotlin 1.9.0 57 enum class Color(val colorName: String, val rgb: String) { RED("Red", "#FF0000"), ORANGE("Orange", with sealed hierarchies (like a sealed class or sealed interface hierarchy), because data object declarations can be used conveniently alongside data class declarations. In this example, declaring maintains symmetry with the accompanying data class definitions. sealed interface ReadResult data class Number(val number: Int) : ReadResult data class Text(val text: String) : ReadResult data object0 码力 | 2049 页 | 45.06 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.2${latest.release.version} 更改为实际的版本号。 3. 编辑 application.yml。 spring: shardingsphere: datasource: names: ds_0, ds_1 ds_0: type: com.zaxxer.hikari.HikariDataSource driverClassName: com.mysql.cj.jdbc.Driver Reading table information for completion of table and column names │Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A "/api/v2/spans" SAMPLER_TYPE: "const" SAMPLER_PARAM: "1" OpenTracing: props: OPENTRACING_TRACER_CLASS_NAME: "org.apache.skywalking.apm.toolkit. opentracing.SkywalkingTracer" OpenTelemetry: props:0 码力 | 446 页 | 4.67 MB | 1 年前3
Apache ShardingSphere v5.5.0 documentStandalonePersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 Fully‐qualified class name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 Definition . . . . . . . . ClusterPersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 Fully‐qualified class name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469 Definition . . . . . . . . DatabaseTypedSQLParserFacade . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Fully‐qualified class name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 Definition . . . . . . . .0 码力 | 602 页 | 3.85 MB | 1 年前3
共 661 条
- 1
- 2
- 3
- 4
- 5
- 6
- 67













