jinri beifen
@@ -34,7 +34,7 @@ Java方法是语句的集合,在一起执行一个功能。
|
||||
* 修饰符:修饰符,这是可选的,告诉编译器如何调用该方法。定义了该方法的访问类型。
|
||||
* 返回值类型 :方法可能会返回值。returnValueType 是方法返回值的数据类型。有些方法执行所需的操作,但没有返回值。在这种情况下,returnValueType 是关键字void。
|
||||
* 方法名:是方法的实际名称。方法名和参数表共同构成方法签名。
|
||||
* 参数类型:参数像是一个占位符。当方法被调用时,传递值给参数。这个值被称为实参或变量。参数列表是指方法的参数类型、顺序和参数的个数。参数是可选的,方法可以不包含任何参数。
|
||||
* 参数类型:参数像是一个占位符。当方法被调用时,传递值给参数。这个值被称为实参或变量。参数列表是指方法的参数类型、顺序和参数的个数。参数是可选的,方法可以不包含任何参数。包括参数类型和参数名。
|
||||
* 方法体:方法体包含具体的语句,定义该方法的功能。
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
## 八、异常
|
||||
|
||||
Throwable 可以用来表示任何可以作为异常抛出的类,分为两种: **Error** 和 **Exception**。其中 Error 用来表示 JVM 无法处理的错误,Exception 分为两种:
|
||||
|
||||
- **受检异常** :需要用 try...catch... 语句捕获并进行处理,并且可以从异常中恢复;
|
||||
- **非受检异常** :是程序运行时错误,例如除 0 会引发 Arithmetic Exception,此时程序崩溃并且无法恢复。
|
||||
|
||||
<div align="center"> <img src="https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/PPjwP.png" width="600"/> </div><br>
|
||||
|
||||
- [Java 入门之异常处理](https://www.cnblogs.com/Blue-Keroro/p/8875898.html)
|
||||
- [Java Exception Interview Questions and Answers](https://www.journaldev.com/2167/java-exception-interview-questions-and-answersl)
|
||||
97
Java基础教程/Java语言基础/06 接口和抽象类.md
Normal file
@@ -0,0 +1,97 @@
|
||||
|
||||
## 1 抽象类
|
||||
|
||||
|
||||
抽象类和抽象方法都使用 abstract 关键字进行声明。
|
||||
* 如果一个类中包含抽象方法,那么这个类必须声明为抽象类。
|
||||
* 任何子类必须重写父类的抽象方法,或者声明自身为抽象类。
|
||||
|
||||
|
||||
抽象类和普通类最大的区别是,抽象类不能被实例化,只能被继承。
|
||||
|
||||
```java
|
||||
public abstract class AbstractClassExample {
|
||||
|
||||
protected int x;
|
||||
private int y;
|
||||
|
||||
public abstract void func1();
|
||||
|
||||
public void func2() {
|
||||
System.out.println("func2");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
public class AbstractExtendClassExample extends AbstractClassExample {
|
||||
@Override
|
||||
public void func1() {
|
||||
System.out.println("func1");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## 2 接口
|
||||
|
||||
|
||||
implements关键字
|
||||
使用 implements 关键字可以变相的使java具有多继承的特性,使用范围为类继承接口的情况,可以同时继承多个接口(接口跟接口之间采用逗号分隔)
|
||||
|
||||
|
||||
接口是抽象类的延伸,在 Java 8 之前,它可以看成是一个完全抽象的类,也就是说它不能有任何的方法实现。
|
||||
|
||||
从 Java 8 开始,**接口也可以拥有默认的方法实现**,这是因为不支持默认方法的接口的维护成本太高了。在 Java 8 之前,如果一个接口想要添加新的方法,那么要修改所有实现了该接口的类,让它们都实现新增的方法。
|
||||
|
||||
接口的成员(字段 + 方法)默认都是 public 的,并且不允许定义为 private 或者 protected。从 Java 9 开始,**允许将方法定义为 private**,这样就能定义某些复用的代码又不会把方法暴露出去。
|
||||
|
||||
接口的字段默认都是 static 和 final 的。
|
||||
|
||||
```java
|
||||
public interface InterfaceExample {
|
||||
|
||||
void func1();
|
||||
|
||||
default void func2(){
|
||||
System.out.println("func2");
|
||||
}
|
||||
|
||||
int x = 123;
|
||||
// int y; // Variable 'y' might not have been initialized
|
||||
public int z = 0; // Modifier 'public' is redundant for interface fields
|
||||
// private int k = 0; // Modifier 'private' not allowed here
|
||||
// protected int l = 0; // Modifier 'protected' not allowed here
|
||||
// private void fun3(); // Modifier 'private' not allowed here
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
public class InterfaceImplementExample implements InterfaceExample {
|
||||
@Override
|
||||
public void func1() {
|
||||
System.out.println("func1");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### 抽象类和接口比较
|
||||
|
||||
- 从设计层面上看,抽象类提供了一种 IS-A 关系,需要满足里式替换原则,即子类对象必须能够替换掉所有父类对象。而接口更像是一种 LIKE-A 关系,它只是提供一种方法实现契约,并不要求接口和实现接口的类具有 IS-A 关系。
|
||||
- 从使用上来看,一个类可以实现多个接口,但是不能继承多个抽象类。
|
||||
- 接口的字段只能是 static 和 final 类型的,而抽象类的字段没有这种限制。
|
||||
- 接口的成员只能是 public 的,而抽象类的成员可以有多种访问权限。
|
||||
|
||||
### 抽象类和接口选择
|
||||
使用接口:
|
||||
|
||||
- 需要让不相关的类都实现一个方法,例如不相关的类都可以实现 Comparable 接口中的 compareTo() 方法;
|
||||
- 需要使用多重继承。
|
||||
|
||||
使用抽象类:
|
||||
|
||||
- 需要在几个相关的类中共享代码。
|
||||
- 需要能控制继承来的成员的访问权限,而不是都为 public。
|
||||
- 需要继承非静态和非常量字段。
|
||||
|
||||
在很多情况下,接口优先于抽象类。因为接口没有抽象类严格的类层次结构要求,可以灵活地为一个类添加行为。并且从 Java 8 开始,接口也可以有默认的方法实现,使得修改接口的成本也变的很低。
|
||||
332
Java基础教程/Java语言基础/07 异常处理.md
Normal file
@@ -0,0 +1,332 @@
|
||||
## 1 异常概述
|
||||
|
||||
### 异常与错误
|
||||
异常是程序中的一些错误。
|
||||
|
||||
* 检查性异常:最具代表的检查性异常是用户错误或问题引起的异常,这是程序员无法预见的。例如要打开一个不存在文件时,一个异常就发生了,这些异常在编译时不能被简单地忽略。
|
||||
* 运行时异常:运行时异常是可能被程序员避免的异常。与检查性异常相反,运行时异常可以在编译时被忽略。
|
||||
* 错误:错误不是异常,而是脱离程序员控制的问题。错误在代码中通常被忽略。例如,当栈溢出时,一个错误就发生了,它们在编译也检查不到的。
|
||||
|
||||
|
||||
### 异常的产生
|
||||
|
||||
* 用户输入了非法数据。
|
||||
* 要打开的文件不存在。
|
||||
* 网络通信时连接中断
|
||||
* JVM内存溢出。
|
||||
|
||||
|
||||
### 异常的层次
|
||||
|
||||
|
||||
|
||||
Throwable 可以用来表示任何可以作为异常抛出的类,分为两种: **Error** 和 **Exception**。其中 Error 用来表示 JVM 无法处理的错误,Error 用来指示运行时环境发生的错误,程序不会从Error中恢复,而是直接down掉。Exception 分为两种:
|
||||
|
||||
- **受检异常** :需要用 try...catch... 语句捕获并进行处理,并且可以从异常中恢复;
|
||||
- **非受检异常** :是程序运行时错误,例如除 0 会引发 Arithmetic Exception,此时程序崩溃并且无法恢复。
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
## 2 异常使用
|
||||
|
||||
### 异常中的方法
|
||||
|
||||
* public String getMessage()
|
||||
返回关于发生的异常的详细信息。这个消息在Throwable 类的构造函数中初始化了。
|
||||
* public Throwable getCause()
|
||||
返回一个 Throwable 对象代表异常原因。
|
||||
* public String toString()
|
||||
返回此 Throwable 的简短描述。
|
||||
* public void printStackTrace()
|
||||
将此 Throwable 及其回溯打印到标准错误流。。
|
||||
* public StackTraceElement [] getStackTrace()
|
||||
返回一个包含堆栈层次的数组。下标为0的元素代表栈顶,最后一个元素代表方法调用堆栈的栈底。
|
||||
* public Throwable fillInStackTrace()
|
||||
用当前的调用栈层次填充Throwable 对象栈层次,添加到栈层次任何先前信息中。
|
||||
|
||||
### 捕获异常
|
||||
* 使用 try 和 catch 关键字可以捕获异常。
|
||||
* Catch 语句包含要捕获异常类型的声明。
|
||||
```java
|
||||
try
|
||||
{
|
||||
// 程序代码
|
||||
}catch(ExceptionName e1)
|
||||
{
|
||||
//Catch 块
|
||||
}
|
||||
|
||||
// 文件名 : ExcepTest.java
|
||||
import java.io.*;
|
||||
public class ExcepTest{
|
||||
|
||||
public static void main(String args[]){
|
||||
try{
|
||||
int a[] = new int[2];
|
||||
System.out.println("Access element three :" + a[3]);
|
||||
}catch(ArrayIndexOutOfBoundsException e){
|
||||
System.out.println("Exception thrown :" + e);
|
||||
}
|
||||
System.out.println("Out of the block");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 多重捕获结构
|
||||
|
||||
* 没有发生异常,会通过所有的捕获语句,不会进入catch
|
||||
* 发生异常,则进入捕获语句,并且不再执行其他捕获语句。执行完成后跳出try-catch语句块,然后执行后续内容。不会终端程序执行。
|
||||
```java
|
||||
try{
|
||||
// 程序代码
|
||||
}catch(异常类型1 异常的变量名1){
|
||||
// 程序代码
|
||||
}catch(异常类型2 异常的变量名2){
|
||||
// 程序代码
|
||||
}catch(异常类型3 异常的变量名3){
|
||||
// 程序代码
|
||||
}
|
||||
```
|
||||
|
||||
### throws/throw 抛出异常
|
||||
如果一个方法无法处理捕获到的异常,那么该方法必须使用 throws 关键字来声明。使用 throw 关键字抛出一个异常。
|
||||
|
||||
throws关键字用来声明该方法可能抛出的异常。只起到声明作用。
|
||||
|
||||
```java
|
||||
import java.io.*;
|
||||
public class className
|
||||
{
|
||||
public void deposit(double amount) throws RemoteException
|
||||
{
|
||||
// Method implementation
|
||||
throw new RemoteException();
|
||||
}
|
||||
//Remainder of class definition
|
||||
}
|
||||
```
|
||||
|
||||
### finally关键字
|
||||
|
||||
无论是否发生异常,finally 代码块中的代码总会被执行。在 finally 代码块中,可以运行清理类型等收尾善后性质的语句。
|
||||
|
||||
> 即使之前的catch语句中有return语句。finally语句块仍旧会被执行。
|
||||
|
||||
```java
|
||||
try{
|
||||
// 程序代码
|
||||
}catch(异常类型1 异常的变量名1){
|
||||
// 程序代码
|
||||
}catch(异常类型2 异常的变量名2){
|
||||
// 程序代码
|
||||
}finally{
|
||||
// 程序代码
|
||||
}
|
||||
|
||||
public class ExcepTest{
|
||||
public static void main(String args[]){
|
||||
int a[] = new int[2];
|
||||
try{
|
||||
System.out.println("Access element three :" + a[3]);
|
||||
}catch(ArrayIndexOutOfBoundsException e){
|
||||
System.out.println("Exception thrown :" + e);
|
||||
}
|
||||
finally{
|
||||
a[0] = 6;
|
||||
System.out.println("First element value: " +a[0]);
|
||||
System.out.println("The finally statement is executed");
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### try-with-resources
|
||||
|
||||
> 模仿python的with语句
|
||||
|
||||
JDK7 之后,Java 新增的 try-with-resource 语法糖来打开资源,并且可以在语句执行完毕后确保每个资源都被自动关闭 。
|
||||
|
||||
JDK7 之前所有被打开的系统资源,比如流、文件或者 Socket 连接等,都需要被开发者手动关闭,否则将会造成资源泄露。
|
||||
```java
|
||||
import java.io.*;
|
||||
|
||||
public class RunoobTest {
|
||||
|
||||
public static void main(String[] args) {
|
||||
String line;
|
||||
try(BufferedReader br = new BufferedReader(new FileReader("test.txt"))) {
|
||||
while ((line = br.readLine()) != null) {
|
||||
System.out.println("Line =>"+line);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
System.out.println("IOException in try block =>" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
try (resource declaration) {
|
||||
// 使用的资源
|
||||
} catch (ExceptionType e1) {
|
||||
// 异常块
|
||||
}
|
||||
```
|
||||
|
||||
* try with resource declaration可以同时处理多个打开的资源
|
||||
* 多个声明资源时,try-with-resources 语句以相反的顺序关闭这些资源。
|
||||
```java
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
class RunoobTest {
|
||||
public static void main(String[] args) throws IOException{
|
||||
try (Scanner scanner = new Scanner(new File("testRead.txt"));
|
||||
PrintWriter writer = new PrintWriter(new File("testWrite.txt"))) {
|
||||
while (scanner.hasNext()) {
|
||||
writer.print(scanner.nextLine());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
## 3 自定义异常
|
||||
|
||||
### 自定义异常
|
||||
* 所有异常都必须是 Throwable 的子类。
|
||||
* 如果希望写一个检查性异常类,则需要继承 Exception 类。
|
||||
* 如果你想写一个运行时异常类,那么需要继承 RuntimeException 类。
|
||||
|
||||
```java
|
||||
class MyException extends Exception{
|
||||
}
|
||||
|
||||
// 文件名InsufficientFundsException.java
|
||||
import java.io.*;
|
||||
|
||||
//自定义异常类,继承Exception类
|
||||
public class InsufficientFundsException extends Exception
|
||||
{
|
||||
//此处的amount用来储存当出现异常(取出钱多于余额时)所缺乏的钱
|
||||
private double amount;
|
||||
public InsufficientFundsException(double amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
public double getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 使用自定义的异常
|
||||
|
||||
```java
|
||||
/ 文件名称 CheckingAccount.java
|
||||
import java.io.*;
|
||||
|
||||
//此类模拟银行账户
|
||||
public class CheckingAccount
|
||||
{
|
||||
//balance为余额,number为卡号
|
||||
private double balance;
|
||||
private int number;
|
||||
public CheckingAccount(int number)
|
||||
{
|
||||
this.number = number;
|
||||
}
|
||||
//方法:存钱
|
||||
public void deposit(double amount)
|
||||
{
|
||||
balance += amount;
|
||||
}
|
||||
//方法:取钱
|
||||
public void withdraw(double amount) throws
|
||||
InsufficientFundsException
|
||||
{
|
||||
if(amount <= balance)
|
||||
{
|
||||
balance -= amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
double needs = amount - balance;
|
||||
throw new InsufficientFundsException(needs);
|
||||
}
|
||||
}
|
||||
//方法:返回余额
|
||||
public double getBalance()
|
||||
{
|
||||
return balance;
|
||||
}
|
||||
//方法:返回卡号
|
||||
public int getNumber()
|
||||
{
|
||||
return number;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 处理自定义的异常
|
||||
|
||||
```
|
||||
//文件名称 BankDemo.java
|
||||
public class BankDemo
|
||||
{
|
||||
public static void main(String [] args)
|
||||
{
|
||||
CheckingAccount c = new CheckingAccount(101);
|
||||
System.out.println("Depositing $500...");
|
||||
c.deposit(500.00);
|
||||
try
|
||||
{
|
||||
System.out.println("\nWithdrawing $100...");
|
||||
c.withdraw(100.00);
|
||||
System.out.println("\nWithdrawing $600...");
|
||||
c.withdraw(600.00);
|
||||
}catch(InsufficientFundsException e)
|
||||
{
|
||||
System.out.println("Sorry, but you are short $"
|
||||
+ e.getAmount());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## 4 常见的异常
|
||||
|
||||
### 常见的运行时异常
|
||||
|
||||
| 异常 | 描述 |
|
||||
|---------------------------------|------------------------------------------------------------------|
|
||||
| ArithmeticException | 当出现异常的运算条件时,抛出此异常。例如,一个整数"除以零"时,抛出此类的一个实例。 |
|
||||
| ArrayIndexOutOfBoundsException | 用非法索引访问数组时抛出的异常。如果索引为负或大于等于数组大小,则该索引为非法索引。 |
|
||||
| ArrayStoreException | 试图将错误类型的对象存储到一个对象数组时抛出的异常。 |
|
||||
| ClassCastException | 当试图将对象强制转换为不是实例的子类时,抛出该异常。 |
|
||||
| IllegalArgumentException | 抛出的异常表明向方法传递了一个不合法或不正确的参数。 |
|
||||
| IllegalMonitorStateException | 抛出的异常表明某一线程已经试图等待对象的监视器,或者试图通知其他正在等待对象的监视器而本身没有指定监视器的线程。 |
|
||||
| IllegalStateException | 在非法或不适当的时间调用方法时产生的信号。换句话说,即 Java 环境或 Java 应用程序没有处于请求操作所要求的适当状态下。 |
|
||||
| IllegalThreadStateException | 线程没有处于请求操作所要求的适当状态时抛出的异常。 |
|
||||
| IndexOutOfBoundsException | 指示某排序索引(例如对数组、字符串或向量的排序)超出范围时抛出。 |
|
||||
| NegativeArraySizeException | 如果应用程序试图创建大小为负的数组,则抛出该异常。 |
|
||||
| NullPointerException | 当应用程序试图在需要对象的地方使用 null 时,抛出该异常 |
|
||||
| NumberFormatException | 当应用程序试图将字符串转换成一种数值类型,但该字符串不能转换为适当格式时,抛出该异常。 |
|
||||
| SecurityException | 由安全管理器抛出的异常,指示存在安全侵犯。 |
|
||||
| StringIndexOutOfBoundsException | 此异常由 String 方法抛出,指示索引或者为负,或者超出字符串的大小。 |
|
||||
| UnsupportedOperationException | 当不支持请求的操作时,抛出该异常。 |
|
||||
|
||||
|
||||
### 常见的检查性异常
|
||||
|
||||
| 异常 | 描述 |
|
||||
|----------------------------|----------------------------------------------------------------------------|
|
||||
| ClassNotFoundException | 应用程序试图加载类时,找不到相应的类,抛出该异常。 |
|
||||
| CloneNotSupportedException | 当调用 Object 类中的 clone 方法克隆对象,但该对象的类无法实现 Cloneable 接口时,抛出该异常。 |
|
||||
| IllegalAccessException | 拒绝访问一个类的时候,抛出该异常。 |
|
||||
| InstantiationException | 当试图使用 Class 类中的 newInstance 方法创建一个类的实例,而指定的类对象因为是一个接口或是一个抽象类而无法实例化时,抛出该异常。 |
|
||||
| InterruptedException | 一个线程被另一个线程中断,抛出该异常。 |
|
||||
| NoSuchFieldException | 请求的变量不存在 |
|
||||
| NoSuchMethodException | 请求的方法不存在 |
|
||||
381
Java基础教程/Java语言基础/08 Java反射.md
Normal file
@@ -0,0 +1,381 @@
|
||||
|
||||
- [深入解析 Java 反射(1)- 基础](http://www.sczyh30.com/posts/Java/java-reflection-1/)
|
||||
- [Java反射超详细,一个快乐的野指针](https://blog.csdn.net/qq_44715943/article/details/120587716)
|
||||
## 1 反射概述
|
||||
|
||||
### 反射机制的作用
|
||||
* 通过java语言中的反射机制可以操作字节码文件(可以读和修改字节码文件。)
|
||||
* 通过反射机制可以操作代码片段。(class文件。)
|
||||
|
||||
|
||||
### Class对象
|
||||
|
||||
Class对象的作用
|
||||
* 每个类都有一个**Class**对象,包含了与类有关的信息,代表整个字节码。代表一个类型,代表整个类。。当编译一个新类时,会产生一个同名的 .class 文件,该文件内容保存着 Class 对象。
|
||||
|
||||
* 类加载相当于 Class 对象的加载,类在第一次使用时才动态加载到 JVM 中。也可以使用 `Class.forName("com.mysql.jdbc.Driver")` 这种方式来控制类的加载,该方法会返回一个 Class 对象。
|
||||
|
||||
* 反射可以提供运行时的类信息,并且这个类可以在运行时才加载进来,甚至在编译时期该类的 .class 不存在也可以加载进来。
|
||||
|
||||
获取Class对象的方法
|
||||
|
||||
* Class.forName(“完整类名带包名”) 静态方法
|
||||
* 对象.getClass()
|
||||
* 任何类型.class
|
||||
|
||||
|
||||
### 反射机制的使用
|
||||
|
||||
java.lang.reflect.*;存储与反射相关的类
|
||||
|
||||
| 类 | 含义 |
|
||||
|------------------|-----|
|
||||
| java.lang.Class | 代表整个字节码。代表一个类型,代表整个类。 |
|
||||
| java.lang.reflect.Method | 代表字节码中的方法字节码。代表类中的方法。 |
|
||||
| java.lang.reflect.Constructor | 代表字节码中的构造方法字节码。代表类中的构造方法。 |
|
||||
| java.lang.reflect.Field | 代表字节码中的属性字节码。代表类中的成员变量(静态变量+实例变量)。 |
|
||||
|
||||
|
||||
|
||||
|
||||
Class 和 java.lang.reflect.* 一起对反射提供了支持,java.lang.reflect 类库主要包含了以下三个类:
|
||||
|
||||
- **Field** :可以使用 get() 和 set() 方法读取和修改 Field 对象关联的字段;
|
||||
- **Method** :可以使用 invoke() 方法调用与 Method 对象关联的方法;
|
||||
- **Constructor** :可以用 Constructor 的 newInstance() 创建新的对象。
|
||||
|
||||
### 反射机制的优点
|
||||
|
||||
- **可扩展性** :应用程序可以利用全限定名创建可扩展对象的实例,来使用来自外部的用户自定义类。
|
||||
- **类浏览器和可视化开发环境** :一个类浏览器需要可以枚举类的成员。可视化开发环境(如 IDE)可以从利用反射中可用的类型信息中受益,以帮助程序员编写正确的代码。
|
||||
- **调试器和测试工具** : 调试器需要能够检查一个类里的私有成员。测试工具可以利用反射来自动地调用类里定义的可被发现的 API 定义,以确保一组测试中有较高的代码覆盖率。
|
||||
|
||||
### 反射的缺点
|
||||
|
||||
尽管反射非常强大,但也不能滥用。如果一个功能可以不用反射完成,那么最好就不用。在我们使用反射技术时,下面几条内容应该牢记于心。
|
||||
|
||||
- **性能开销** :反射涉及了动态类型的解析,所以 JVM 无法对这些代码进行优化。因此,反射操作的效率要比那些非反射操作低得多。我们应该避免在经常被执行的代码或对性能要求很高的程序中使用反射。
|
||||
|
||||
- **安全限制** :使用反射技术要求程序必须在一个没有安全限制的环境中运行。如果一个程序必须在有安全限制的环境中运行,如 Applet,那么这就是个问题了。
|
||||
|
||||
- **内部暴露** :由于反射允许代码执行一些在正常情况下不被允许的操作(比如访问私有的属性和方法),所以使用反射可能会导致意料之外的副作用,这可能导致代码功能失调并破坏可移植性。反射代码破坏了抽象性,因此当平台发生改变的时候,代码的行为就有可能也随着变化。
|
||||
|
||||
|
||||
|
||||
|
||||
### 反射机制的使用
|
||||
|
||||
* 使用Class实例化一个对象。
|
||||
```java
|
||||
class ReflectTest02{
|
||||
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
|
||||
// 下面这段代码是以反射机制的方式创建对象。
|
||||
|
||||
// 通过反射机制,获取Class,通过Class来实例化对象
|
||||
Class c = Class.forName("javase.reflectBean.User");
|
||||
// newInstance() 这个方法会调用User这个类的无参数构造方法,完成对象的创建。
|
||||
// 重点是:newInstance()调用的是无参构造,必须保证无参构造是存在的!
|
||||
Object obj = c.newInstance();
|
||||
System.out.println(obj);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
* 使得一个类的静态代码执行,而其他代码不执行。例如JDBC中不需要创建实例而知识执行静态方法.这个方法的执行会导致类加载,类加载时,静态代码块执行。
|
||||
|
||||
```java
|
||||
Class.forName("完整类名");
|
||||
```
|
||||
|
||||
## 2 反射机制实现
|
||||
### Class 中的方法
|
||||
| 方法名 | 备注 |
|
||||
|---|---|
|
||||
| public T newInstance() | 创建对象 |
|
||||
| public String getName() | 返回完整类名带包名 |
|
||||
| public String getSimpleName() | 返回类名 |
|
||||
| public Field[] getFields() | 返回类中public修饰的属性 |
|
||||
| public Field[] getDeclaredFields() | 返回类中所有的属性 |
|
||||
| public Field getDeclaredField(String name) | 根据属性名name获取指定的属性 |
|
||||
| public native int getModifiers() | 获取属性的修饰符列表,返回的修饰符是一个数字,每个数字是修饰符的代号【一般配合Modifier类的toString(int x)方法使用】 |
|
||||
| public Method[] getDeclaredMethods() | 返回类中所有的实例方法 |
|
||||
| public Method getDeclaredMethod(String name, Class<?>… parameterTypes) | 根据方法名name和方法形参获取指定方法 |
|
||||
| public Constructor<?>[] getDeclaredConstructors() | 返回类中所有的构造方法 |
|
||||
| public Constructor getDeclaredConstructor(Class<?>… parameterTypes) | 根据方法形参获取指定的构造方法 |
|
||||
| ---- | ---- |
|
||||
| public native Class<? super T> getSuperclass() | 返回调用类的父类 |
|
||||
| public Class<?>[] getInterfaces() | 返回调用类实现的接口集合 |
|
||||
|
||||
|
||||
### Field中的方法
|
||||
|
||||
| 方法名 | 备注 |
|
||||
|---|---|
|
||||
| public String getName() | 返回属性名 |
|
||||
| public int getModifiers() | 获取属性的修饰符列表,返回的修饰符是一个数字,每个数字是修饰符的代号【一般配合Modifier类的toString(int x)方法使用】 |
|
||||
| public Class<?> getType() | 以Class类型,返回属性类型【一般配合Class类的getSimpleName()方法使用】 |
|
||||
| public void set(Object obj, Object value) | 设置属性值 |
|
||||
| public Object get(Object obj) | 读取属性值 |
|
||||
|
||||
|
||||
```java
|
||||
/*
|
||||
必须掌握:
|
||||
怎么通过反射机制访问一个java对象的属性?
|
||||
给属性赋值set
|
||||
获取属性的值get
|
||||
*/
|
||||
class ReflectTest07{
|
||||
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchFieldException {
|
||||
//不使用反射机制给属性赋值
|
||||
Student student = new Student();
|
||||
/**给属性赋值三要素:给s对象的no属性赋值1111
|
||||
* 要素1:对象s
|
||||
* 要素2:no属性
|
||||
* 要素3:1111
|
||||
*/
|
||||
student.no = 1111;
|
||||
/**读属性值两个要素:获取s对象的no属性的值。
|
||||
* 要素1:对象s
|
||||
* 要素2:no属性
|
||||
*/
|
||||
System.out.println(student.no);
|
||||
|
||||
//使用反射机制给属性赋值
|
||||
Class studentClass = Class.forName("javase.reflectBean.Student");
|
||||
Object obj = studentClass.newInstance();// obj就是Student对象。(底层调用无参数构造方法)
|
||||
|
||||
// 获取no属性(根据属性的名称来获取Field)
|
||||
Field noField = studentClass.getDeclaredField("no");
|
||||
// 给obj对象(Student对象)的no属性赋值
|
||||
/*
|
||||
虽然使用了反射机制,但是三要素还是缺一不可:
|
||||
要素1:obj对象
|
||||
要素2:no属性
|
||||
要素3:22222值
|
||||
注意:反射机制让代码复杂了,但是为了一个“灵活”,这也是值得的。
|
||||
*/
|
||||
noField.set(obj, 22222);
|
||||
|
||||
// 读取属性的值
|
||||
// 两个要素:获取obj对象的no属性的值。
|
||||
System.out.println(noField.get(obj));
|
||||
}
|
||||
```
|
||||
|
||||
* set()方法不可以访问私有属性,需要打破封装,才可以。
|
||||
* public void setAccessible(boolean flag) 默认false,设置为true为打破封装
|
||||
```java
|
||||
// 可以访问私有的属性吗?
|
||||
Field nameField = studentClass.getDeclaredField("name");
|
||||
// 打破封装(反射机制的缺点:打破封装,可能会给不法分子留下机会!!!)
|
||||
// 这样设置完之后,在外部也是可以访问private的。
|
||||
nameField.setAccessible(true);
|
||||
// 给name属性赋值
|
||||
nameField.set(obj, "xiaowu");
|
||||
// 获取name属性的值
|
||||
System.out.println(nameField.get(obj));
|
||||
```
|
||||
|
||||
|
||||
### Method中的方法
|
||||
|
||||
| 方法名 | 备注 |
|
||||
|---|---|
|
||||
| public String getName() | 返回方法名 |
|
||||
| public int getModifiers() | 获取方法的修饰符列表,返回的修饰符是一个数字,每个数字是修饰符的代号【一般配合Modifier类的toString(int x)方法使用】 |
|
||||
| public Class<?> getReturnType() | 以Class类型,返回方法类型【一般配合Class类的getSimpleName()方法使用】 |
|
||||
| public Class<?>[] getParameterTypes() | 返回方法的修饰符列表(一个方法的参数可能会有多个。)【结果集一般配合Class类的getSimpleName()方法使用】 |
|
||||
| public Object invoke(Object obj, Object… args) | 调用方法 |
|
||||
|
||||
* 获取一个类中的method方法
|
||||
```java
|
||||
/*
|
||||
了解一下,不需要掌握(反编译一个类的方法。)
|
||||
*/
|
||||
class ReflectTest09{
|
||||
public static void main(String[] args) throws ClassNotFoundException {
|
||||
StringBuilder s = new StringBuilder();
|
||||
|
||||
Class userServiceClass = Class.forName("java.lang.String");
|
||||
|
||||
s.append(Modifier.toString(userServiceClass.getModifiers()));
|
||||
s.append(" class ");
|
||||
s.append(userServiceClass.getSimpleName());
|
||||
s.append(" {\n");
|
||||
|
||||
// 获取所有的Method(包括私有的!)
|
||||
Method[] methods = userServiceClass.getDeclaredMethods();
|
||||
for (Method m : methods){
|
||||
s.append("\t");
|
||||
// 获取修饰符列表
|
||||
s.append(Modifier.toString(m.getModifiers()));
|
||||
s.append(" ");
|
||||
// 获取方法的返回值类型
|
||||
s.append(m.getReturnType().getSimpleName());
|
||||
s.append(" ");
|
||||
// 获取方法名
|
||||
s.append(m.getName());
|
||||
s.append("(");
|
||||
// 方法的修饰符列表(一个方法的参数可能会有多个。)
|
||||
Class[] parameterTypes = m.getParameterTypes();
|
||||
for (int i = 0; i < parameterTypes.length; i++){
|
||||
s.append(parameterTypes[i].getSimpleName());
|
||||
if (i != parameterTypes.length - 1) s.append(", ");
|
||||
}
|
||||
s.append(") {}\n");
|
||||
}
|
||||
s.append("}");
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
* 调用类中的方法Method
|
||||
* 方法.invoke(对象, 实参);
|
||||
|
||||
```java
|
||||
/*
|
||||
重点:必须掌握,通过反射机制怎么调用一个对象的方法?
|
||||
五颗星*****
|
||||
|
||||
反射机制,让代码很具有通用性,可变化的内容都是写到配置文件当中,
|
||||
将来修改配置文件之后,创建的对象不一样了,调用的方法也不同了,
|
||||
但是java代码不需要做任何改动。这就是反射机制的魅力。
|
||||
*/
|
||||
class ReflectTest10{
|
||||
public static void main(String[] args) throws Exception {
|
||||
// 不使用反射机制,怎么调用方法
|
||||
// 创建对象
|
||||
UserService userService = new UserService();
|
||||
// 调用方法
|
||||
/*
|
||||
要素分析:
|
||||
要素1:对象userService
|
||||
要素2:login方法名
|
||||
要素3:实参列表
|
||||
要素4:返回值
|
||||
*/
|
||||
System.out.println(userService.login("admin", "123") ? "登入成功!" : "登入失败!");
|
||||
|
||||
//使用反射机制调用方法
|
||||
Class userServiceClass = Class.forName("javase.reflectBean.UserService");
|
||||
// 创建对象
|
||||
Object obj = userServiceClass.newInstance();
|
||||
// 获取Method
|
||||
Method loginMethod = userServiceClass.getDeclaredMethod("login", String.class, String.class);
|
||||
// Method loginMethod = userServiceClass.getDeclaredMethod("login");//注:没有形参就不传
|
||||
// 调用方法
|
||||
// 调用方法有几个要素? 也需要4要素。
|
||||
// 反射机制中最最最最最重要的一个方法,必须记住。
|
||||
/*
|
||||
四要素:
|
||||
loginMethod方法
|
||||
obj对象
|
||||
"admin","123" 实参
|
||||
retValue 返回值
|
||||
*/
|
||||
Object resValues = loginMethod.invoke(obj, "admin", "123");//注:方法返回值是void 结果是null
|
||||
System.out.println(resValues);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Constructor中的方法
|
||||
|
||||
| 方法名 | 备注 |
|
||||
|---|---|
|
||||
| public String getName() | 返回构造方法名 |
|
||||
| public int getModifiers() | 获取构造方法的修饰符列表,返回的修饰符是一个数字,每个数字是修饰符的代号【一般配合Modifier类的toString(int x)方法使用】 |
|
||||
| public Class<?>[] getParameterTypes() | 返回构造方法的修饰符列表(一个方法的参数可能会有多个。)【结果集一般配合Class类的getSimpleName()方法使用】 |
|
||||
| public T newInstance(Object … initargs) | 创建对象【参数为创建对象的数据】 |
|
||||
|
||||
|
||||
* 获取Constructor方法
|
||||
|
||||
```java
|
||||
/*
|
||||
反编译一个类的Constructor构造方法。
|
||||
*/
|
||||
class ReflectTest11{
|
||||
public static void main(String[] args) throws ClassNotFoundException {
|
||||
StringBuilder s = new StringBuilder();
|
||||
|
||||
Class vipClass = Class.forName("javase.reflectBean.Vip");
|
||||
|
||||
//public class UserService {
|
||||
s.append(Modifier.toString(vipClass.getModifiers()));
|
||||
s.append(" class ");
|
||||
s.append(vipClass.getSimpleName());
|
||||
s.append("{\n");
|
||||
|
||||
Constructor[] constructors = vipClass.getDeclaredConstructors();
|
||||
for (Constructor c : constructors){
|
||||
//public Vip(int no, String name, String birth, boolean sex) {
|
||||
s.append("\t");
|
||||
s.append(Modifier.toString(c.getModifiers()));
|
||||
s.append(" ");
|
||||
// s.append(c.getName());//包名+类名
|
||||
s.append(vipClass.getSimpleName());//类名
|
||||
s.append("(");
|
||||
Class[] parameterTypes = c.getParameterTypes();
|
||||
for (int i = 0; i < parameterTypes.length; i++){
|
||||
s.append(parameterTypes[i].getSimpleName());
|
||||
if (i != parameterTypes.length - 1 ) s.append(", ");
|
||||
}
|
||||
s.append("){}\n");
|
||||
}
|
||||
|
||||
s.append("}");
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
* 调用Constructor方法创建对象
|
||||
* 先获取到这个有参数的构造方法【用ClassgetDeclaredConstructor()方法获取】
|
||||
* 调用构造方法new对象【用Constructor类的newInstance()方法new对象】
|
||||
|
||||
```java
|
||||
/*
|
||||
比上一个例子(ReflectTest11)重要一些!!!
|
||||
|
||||
通过反射机制调用构造方法实例化java对象。(这个不是重点)
|
||||
*/
|
||||
class ReflectTest12{
|
||||
public static void main(String[] args) throws Exception {
|
||||
//不适用反射创建对象
|
||||
Vip vip1 = new Vip();
|
||||
Vip vip2 = new Vip(123, "zhangsan", "2001-10-19", false);
|
||||
|
||||
//使用反射机制创建对象(以前)
|
||||
Class vipClass = Class.forName("javase.reflectBean.Vip");
|
||||
// 调用无参数构造方法
|
||||
Object obj1 = vipClass.newInstance();//Class类的newInstance方法
|
||||
System.out.println(obj1);
|
||||
|
||||
//使用反射机制创建对象(现在)
|
||||
// 调用有参数的构造方法怎么办?
|
||||
// 第一步:先获取到这个有参数的构造方法
|
||||
Constructor c1 = vipClass.getDeclaredConstructor(int.class, String.class, String.class, boolean.class);
|
||||
// 第二步:调用构造方法new对象
|
||||
Object obj2 = c1.newInstance(321, "lsi", "1999-10-11", true);//Constructor类的newInstance方法
|
||||
System.out.println(obj2);
|
||||
|
||||
// 获取无参数构造方法
|
||||
Constructor c2 = vipClass.getDeclaredConstructor();
|
||||
Object obj3 = c2.newInstance();
|
||||
System.out.println(obj3);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### 获取一个类的父类以及实现的接口
|
||||
两个方法【Class类中的】
|
||||
|
||||
* public native Class<? super T> getSuperclass()
|
||||
* public Class<?>[] getInterfaces()
|
||||
212
Java基础教程/Java语言基础/09 Java泛型.md
Normal file
@@ -0,0 +1,212 @@
|
||||
> [Java 泛型详解](https://blog.csdn.net/ChenRui_yz/article/details/122935621)
|
||||
## 1 泛型概述
|
||||
|
||||
### 基本概念
|
||||
|
||||
Java 泛型(generics)是 JDK 5 中引入的一个新特性, 泛型提供了编译时类型安全检测机制,该机制允许程序员在编译时检测到非法的类型。
|
||||
|
||||
泛型的本质是参数化类型,即给类型指定一个参数,然后在使用时再指定此参数具体的值,那样这个类型就可以在使用时决定了。这种参数类型可以用在类、接口和方法中,分别被称为泛型类、泛型接口、泛型方法。
|
||||
|
||||

|
||||
|
||||
|
||||
### 泛型的基本用法
|
||||
|
||||
```java
|
||||
public class Box<T> {
|
||||
// T stands for "Type"
|
||||
private T t;
|
||||
public void set(T t) { this.t = t; }
|
||||
public T get() { return t; }
|
||||
}
|
||||
```
|
||||
|
||||
## 2 优势
|
||||
1. 安全性?
|
||||
2. 消除转换?
|
||||
3. 提升性能?
|
||||
4. 重用行。不同类型不需要重载。泛型本质上也是一种编译时多态。
|
||||
|
||||
### 安全性
|
||||
在没有泛型之前,从集合中读取到的每一个对象都必须进行类型转换,如果不小心插入了错误的类型对象,在运行时的转换处理就会出错。
|
||||
|
||||
* 没有泛型的情况下使用集合:
|
||||
```java
|
||||
public static void noGeneric() {
|
||||
ArrayList names = new ArrayList();
|
||||
names.add("mikechen的互联网架构");
|
||||
names.add(123); //编译正常
|
||||
}
|
||||
```
|
||||
* 有泛型的情况下使用集合:
|
||||
```java
|
||||
public static void useGeneric() {
|
||||
ArrayList<String> names = new ArrayList<>();
|
||||
names.add("mikechen的互联网架构");
|
||||
names.add(123); //编译不通过
|
||||
}
|
||||
```
|
||||
相当于告诉编译器每个集合接收的对象类型是什么,编译器在编译期就会做类型检查,告知是否插入了错误类型的对象,使得程序更加安全,增强了程序的健壮性。
|
||||
|
||||
|
||||
### 消除强制转换
|
||||
泛型的一个附带好处是,消除源代码中的许多强制类型转换,这使得代码更加可读,并且减少了出错机会。
|
||||
|
||||
|
||||
* 以下没有泛型的代码段需要强制转换:
|
||||
```java
|
||||
List list = new ArrayList();
|
||||
list.add("hello");
|
||||
String s = (String) list.get(0);
|
||||
```
|
||||
* 当重写为使用泛型时,代码不需要强制转换:
|
||||
```java
|
||||
List<String> list = new ArrayList<String>();
|
||||
list.add("hello");
|
||||
String s = list.get(0); // no cast
|
||||
```
|
||||
|
||||
- [Java 泛型详解](https://www.cnblogs.com/Blue-Keroro/p/8875898.html)
|
||||
- [10 道 Java 泛型面试题](https://cloud.tencent.com/developer/article/1033693)
|
||||
|
||||
### 避免了不必要的装箱、拆箱操作,提高程序的性能
|
||||
|
||||
在非泛型编程中,将简单类型作为Object传递时会引起Boxing(装箱)和Unboxing(拆箱)操作,这两个过程都是具有很大开销的。引入泛型后,就不必进行Boxing和Unboxing操作了,所以运行效率相对较高,特别在对集合操作非常频繁的系统中,这个特点带来的性能提升更加明显。
|
||||
|
||||
* 泛型变量固定了类型,使用的时候就已经知道是值类型还是引用类型,避免了不必要的装箱、拆箱操作。
|
||||
```java
|
||||
object a=1;//由于是object类型,会自动进行装箱操作。
|
||||
|
||||
int b=(int)a;//强制转换,拆箱操作。这样一去一来,当次数多了以后会影响程序的运行效率。
|
||||
```
|
||||
* 使用泛型之后
|
||||
```java
|
||||
public static T GetValue<T>(T a)
|
||||
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
public static void Main()
|
||||
|
||||
{
|
||||
int b=GetValue<int>(1);//使用这个方法的时候已经指定了类型是int,所以不会有装箱和拆箱的操作。
|
||||
}
|
||||
```
|
||||
|
||||
### 提高了代码的重用行
|
||||
> 省略
|
||||
|
||||
## 3 泛型的使用
|
||||
|
||||
### 泛型类
|
||||
* 定义泛型类,在类名后添加一对尖括号,并在尖括号中填写类型参数,参数可以有多个,多个参数使用逗号分隔:
|
||||
```java
|
||||
public class 类名 <泛型类型1,...> {}
|
||||
public class GenericClass<ab,a,c> {}
|
||||
```
|
||||
|
||||
* 实例代码
|
||||
|
||||
```java
|
||||
public class GenericClass<T> {
|
||||
private T value;
|
||||
|
||||
|
||||
public GenericClass(T value) {
|
||||
this.value = value;
|
||||
}
|
||||
public T getValue() {
|
||||
return value;
|
||||
}
|
||||
public void setValue(T value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
```
|
||||
### 泛型接口
|
||||
|
||||
```java
|
||||
public interface GenericInterface<T> {
|
||||
void show(T value);
|
||||
}
|
||||
|
||||
public class StringShowImpl implements GenericInterface<String> {
|
||||
@Override
|
||||
public void show(String value) {
|
||||
System.out.println(value);
|
||||
}}
|
||||
|
||||
public class NumberShowImpl implements GenericInterface<Integer> {
|
||||
@Override
|
||||
public void show(Integer value) {
|
||||
System.out.println(value);
|
||||
}}
|
||||
```
|
||||
|
||||
|
||||
### 泛型方法
|
||||
|
||||
```java
|
||||
修饰符 <代表泛型的变量> 返回值类型 方法名(参数){ }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param t 传入泛型的参数
|
||||
* @param <T> 泛型的类型
|
||||
* @return T 返回值为T类型
|
||||
* 说明:
|
||||
* 1)public 与 返回值中间<T>非常重要,可以理解为声明此方法为泛型方法。
|
||||
* 2)只有声明了<T>的方法才是泛型方法,泛型类中的使用了泛型的成员方法并不是泛型方法。
|
||||
* 3)<T>表明该方法将使用泛型类型T,此时才可以在方法中使用泛型类型T。
|
||||
* 4)与泛型类的定义一样,此处T可以随便写为任意标识,常见的如T、E等形式的参数常用于表示泛型。
|
||||
*/
|
||||
public <T> T genercMethod(T t){
|
||||
System.out.println(t.getClass());
|
||||
System.out.println(t);
|
||||
return t;
|
||||
}
|
||||
```
|
||||
|
||||
## 4 泛型通配符
|
||||
|
||||
Java泛型的通配符是用于解决泛型之间引用传递问题的特殊语法。泛型与继承之间的关系
|
||||
1. 无边界通配符<?>
|
||||
1. 无边界的通配符的主要作用就是让泛型能够接受未知类型的数据.
|
||||
2. 固定上边界的通配符<? extends E>
|
||||
1. 使用固定上边界的通配符的泛型, 就能够接受指定类及其子类类型的数据。
|
||||
2. 要声明使用该类通配符, 采用<? extends E>的形式, 这里的E就是该泛型的上边界。
|
||||
3. 注意: 这里虽然用的是extends关键字, 却不仅限于继承了父类E的子类, 也可以代指显现了接口E的类
|
||||
3. 固定下边界的通配符<? super E>
|
||||
1. 使用固定下边界的通配符的泛型, 就能够接受指定类及其父类类型的数据.。
|
||||
2. 要声明使用该类通配符, 采用<? super E>的形式, 这里的E就是该泛型的下边界.。
|
||||
3. 注意: 你可以为一个泛型指定上边界或下边界, 但是不能同时指定上下边界。
|
||||
```java
|
||||
//表示类型参数可以是任何类型
|
||||
public class Apple<?>{}
|
||||
|
||||
//表示类型参数必须是A或者是A的子类
|
||||
public class Apple<T extends A>{}
|
||||
|
||||
//表示类型参数必须是A或者是A的超类型
|
||||
public class Apple<T supers A>{}
|
||||
```
|
||||
|
||||
## 5 泛型中的KTVE
|
||||
|
||||
泛型中的规范
|
||||
* T:任意类型 type
|
||||
* E:集合中元素的类型 element
|
||||
* K:key-value形式 key
|
||||
* V: key-value形式 value
|
||||
* N: Number(数值类型)
|
||||
* ?: 表示不确定的java类型
|
||||
|
||||
|
||||
## 6 泛型的实现原理
|
||||
|
||||
泛型本质是将数据类型参数化,它通过擦除的方式来实现,即编译器会在编译期间「擦除」泛型语法并相应的做出一些类型转换动作。
|
||||
|
||||
实际上编译器会正常的将使用泛型的地方编译并进行类型擦除,然后返回实例。但是除此之外的是,如果构建泛型实例时使用了泛型语法,那么编译器将标记该实例并关注该实例后续所有方法的调用,每次调用前都进行安全检查,非指定类型的方法都不能调用成功。
|
||||
|
||||
实际上编译器不仅关注一个泛型方法的调用,它还会为某些返回值为限定的泛型类型的方法进行强制类型转换,由于类型擦除,返回值为泛型类型的方法都会擦除成 Object 类型,当这些方法被调用后,编译器会额外插入一行 checkcast 指令用于强制类型转换,这一个过程就叫做『泛型翻译』。
|
||||
5
Java基础教程/Java语言基础/10 Java注解.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## 10 注解
|
||||
|
||||
Java 注解是附加在代码中的一些元信息,用于一些工具在编译、运行时进行解析和使用,起到说明、配置的功能。注解不会也不能影响代码的实际逻辑,仅仅起到辅助性的作用。
|
||||
|
||||
[注解 Annotation 实现原理与自定义注解例子](https://www.cnblogs.com/acm-bingzi/p/javaAnnotation.html)
|
||||
366
Java基础教程/Java语言基础/11 Object类.md
Normal file
@@ -0,0 +1,366 @@
|
||||
## Object 通用方法
|
||||
|
||||
### 概览
|
||||
|
||||
```java
|
||||
|
||||
public native int hashCode()
|
||||
|
||||
public boolean equals(Object obj)
|
||||
|
||||
protected native Object clone() throws CloneNotSupportedException
|
||||
|
||||
public String toString()
|
||||
|
||||
public final native Class<?> getClass()
|
||||
|
||||
protected void finalize() throws Throwable {}
|
||||
|
||||
public final native void notify()
|
||||
|
||||
public final native void notifyAll()
|
||||
|
||||
public final native void wait(long timeout) throws InterruptedException
|
||||
|
||||
public final void wait(long timeout, int nanos) throws InterruptedException
|
||||
|
||||
public final void wait() throws InterruptedException
|
||||
```
|
||||
|
||||
### equals()
|
||||
|
||||
**1. 等价关系**
|
||||
|
||||
两个对象具有等价关系,需要满足以下五个条件:
|
||||
|
||||
Ⅰ 自反性
|
||||
|
||||
```java
|
||||
x.equals(x); // true
|
||||
```
|
||||
|
||||
Ⅱ 对称性
|
||||
|
||||
```java
|
||||
x.equals(y) == y.equals(x); // true
|
||||
```
|
||||
|
||||
Ⅲ 传递性
|
||||
|
||||
```java
|
||||
if (x.equals(y) && y.equals(z))
|
||||
x.equals(z); // true;
|
||||
```
|
||||
|
||||
Ⅳ 一致性
|
||||
|
||||
多次调用 equals() 方法结果不变
|
||||
|
||||
```java
|
||||
x.equals(y) == x.equals(y); // true
|
||||
```
|
||||
|
||||
Ⅴ 与 null 的比较
|
||||
|
||||
对任何不是 null 的对象 x 调用 x.equals(null) 结果都为 false
|
||||
|
||||
```java
|
||||
x.equals(null); // false;
|
||||
```
|
||||
|
||||
**2. 等价与相等**
|
||||
|
||||
- 对于基本类型,== 判断两个值是否相等,基本类型没有 equals() 方法。
|
||||
- 对于引用类型,== 判断两个变量是否引用同一个对象,而 equals() 判断引用的对象是否等价。
|
||||
|
||||
```java
|
||||
Integer x = new Integer(1);
|
||||
Integer y = new Integer(1);
|
||||
System.out.println(x.equals(y)); // true
|
||||
System.out.println(x == y); // false
|
||||
```
|
||||
|
||||
**3. 实现**
|
||||
|
||||
- 检查是否为同一个对象的引用,如果是直接返回 true;
|
||||
- 检查是否是同一个类型,如果不是,直接返回 false;
|
||||
- 将 Object 对象进行转型;
|
||||
- 判断每个关键域是否相等。
|
||||
|
||||
```java
|
||||
public class EqualExample {
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
private int z;
|
||||
|
||||
public EqualExample(int x, int y, int z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
EqualExample that = (EqualExample) o;
|
||||
|
||||
if (x != that.x) return false;
|
||||
if (y != that.y) return false;
|
||||
return z == that.z;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### hashCode()
|
||||
|
||||
hashCode() 返回哈希值,而 equals() 是用来判断两个对象是否等价。等价的两个对象散列值一定相同,但是散列值相同的两个对象不一定等价,这是因为计算哈希值具有随机性,两个值不同的对象可能计算出相同的哈希值。
|
||||
|
||||
在覆盖 equals() 方法时应当总是覆盖 hashCode() 方法,保证等价的两个对象哈希值也相等。
|
||||
|
||||
HashSet 和 HashMap 等集合类使用了 hashCode() 方法来计算对象应该存储的位置,因此要将对象添加到这些集合类中,需要让对应的类实现 hashCode() 方法。
|
||||
|
||||
下面的代码中,新建了两个等价的对象,并将它们添加到 HashSet 中。我们希望将这两个对象当成一样的,只在集合中添加一个对象。但是 EqualExample 没有实现 hashCode() 方法,因此这两个对象的哈希值是不同的,最终导致集合添加了两个等价的对象。
|
||||
|
||||
```java
|
||||
EqualExample e1 = new EqualExample(1, 1, 1);
|
||||
EqualExample e2 = new EqualExample(1, 1, 1);
|
||||
System.out.println(e1.equals(e2)); // true
|
||||
HashSet<EqualExample> set = new HashSet<>();
|
||||
set.add(e1);
|
||||
set.add(e2);
|
||||
System.out.println(set.size()); // 2
|
||||
```
|
||||
|
||||
理想的哈希函数应当具有均匀性,即不相等的对象应当均匀分布到所有可能的哈希值上。这就要求了哈希函数要把所有域的值都考虑进来。可以将每个域都当成 R 进制的某一位,然后组成一个 R 进制的整数。
|
||||
|
||||
R 一般取 31,因为它是一个奇素数,如果是偶数的话,当出现乘法溢出,信息就会丢失,因为与 2 相乘相当于向左移一位,最左边的位丢失。并且一个数与 31 相乘可以转换成移位和减法:`31*x == (x<<5)-x`,编译器会自动进行这个优化。
|
||||
|
||||
```java
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + x;
|
||||
result = 31 * result + y;
|
||||
result = 31 * result + z;
|
||||
return result;
|
||||
}
|
||||
```
|
||||
|
||||
### toString()
|
||||
|
||||
默认返回 ToStringExample@4554617c 这种形式,其中 @ 后面的数值为散列码的无符号十六进制表示。
|
||||
|
||||
```java
|
||||
public class ToStringExample {
|
||||
|
||||
private int number;
|
||||
|
||||
public ToStringExample(int number) {
|
||||
this.number = number;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
ToStringExample example = new ToStringExample(123);
|
||||
System.out.println(example.toString());
|
||||
```
|
||||
|
||||
```html
|
||||
ToStringExample@4554617c
|
||||
```
|
||||
|
||||
### clone()
|
||||
|
||||
**1. cloneable**
|
||||
|
||||
clone() 是 Object 的 protected 方法,它不是 public,一个类不显式去重写 clone(),其它类就不能直接去调用该类实例的 clone() 方法。
|
||||
|
||||
```java
|
||||
public class CloneExample {
|
||||
private int a;
|
||||
private int b;
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
CloneExample e1 = new CloneExample();
|
||||
// CloneExample e2 = e1.clone(); // 'clone()' has protected access in 'java.lang.Object'
|
||||
```
|
||||
|
||||
重写 clone() 得到以下实现:
|
||||
|
||||
```java
|
||||
public class CloneExample {
|
||||
private int a;
|
||||
private int b;
|
||||
|
||||
@Override
|
||||
public CloneExample clone() throws CloneNotSupportedException {
|
||||
return (CloneExample)super.clone();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
CloneExample e1 = new CloneExample();
|
||||
try {
|
||||
CloneExample e2 = e1.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
```html
|
||||
java.lang.CloneNotSupportedException: CloneExample
|
||||
```
|
||||
|
||||
以上抛出了 CloneNotSupportedException,这是因为 CloneExample 没有实现 Cloneable 接口。
|
||||
|
||||
应该注意的是,clone() 方法并不是 Cloneable 接口的方法,而是 Object 的一个 protected 方法。Cloneable 接口只是规定,如果一个类没有实现 Cloneable 接口又调用了 clone() 方法,就会抛出 CloneNotSupportedException。
|
||||
|
||||
```java
|
||||
public class CloneExample implements Cloneable {
|
||||
private int a;
|
||||
private int b;
|
||||
|
||||
@Override
|
||||
public Object clone() throws CloneNotSupportedException {
|
||||
return super.clone();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**2. 浅拷贝**
|
||||
|
||||
拷贝对象和原始对象的引用类型引用同一个对象。
|
||||
|
||||
```java
|
||||
public class ShallowCloneExample implements Cloneable {
|
||||
|
||||
private int[] arr;
|
||||
|
||||
public ShallowCloneExample() {
|
||||
arr = new int[10];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
arr[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
public void set(int index, int value) {
|
||||
arr[index] = value;
|
||||
}
|
||||
|
||||
public int get(int index) {
|
||||
return arr[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ShallowCloneExample clone() throws CloneNotSupportedException {
|
||||
return (ShallowCloneExample) super.clone();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
ShallowCloneExample e1 = new ShallowCloneExample();
|
||||
ShallowCloneExample e2 = null;
|
||||
try {
|
||||
e2 = e1.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
e1.set(2, 222);
|
||||
System.out.println(e2.get(2)); // 222
|
||||
```
|
||||
|
||||
**3. 深拷贝**
|
||||
|
||||
拷贝对象和原始对象的引用类型引用不同对象。
|
||||
|
||||
```java
|
||||
public class DeepCloneExample implements Cloneable {
|
||||
|
||||
private int[] arr;
|
||||
|
||||
public DeepCloneExample() {
|
||||
arr = new int[10];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
arr[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
public void set(int index, int value) {
|
||||
arr[index] = value;
|
||||
}
|
||||
|
||||
public int get(int index) {
|
||||
return arr[index];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DeepCloneExample clone() throws CloneNotSupportedException {
|
||||
DeepCloneExample result = (DeepCloneExample) super.clone();
|
||||
result.arr = new int[arr.length];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
result.arr[i] = arr[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
DeepCloneExample e1 = new DeepCloneExample();
|
||||
DeepCloneExample e2 = null;
|
||||
try {
|
||||
e2 = e1.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
e1.set(2, 222);
|
||||
System.out.println(e2.get(2)); // 2
|
||||
```
|
||||
|
||||
**4. clone() 的替代方案**
|
||||
|
||||
使用 clone() 方法来拷贝一个对象即复杂又有风险,它会抛出异常,并且还需要类型转换。Effective Java 书上讲到,最好不要去使用 clone(),可以使用拷贝构造函数或者拷贝工厂来拷贝一个对象。
|
||||
|
||||
```java
|
||||
public class CloneConstructorExample {
|
||||
|
||||
private int[] arr;
|
||||
|
||||
public CloneConstructorExample() {
|
||||
arr = new int[10];
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
arr[i] = i;
|
||||
}
|
||||
}
|
||||
|
||||
public CloneConstructorExample(CloneConstructorExample original) {
|
||||
arr = new int[original.arr.length];
|
||||
for (int i = 0; i < original.arr.length; i++) {
|
||||
arr[i] = original.arr[i];
|
||||
}
|
||||
}
|
||||
|
||||
public void set(int index, int value) {
|
||||
arr[index] = value;
|
||||
}
|
||||
|
||||
public int get(int index) {
|
||||
return arr[index];
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```java
|
||||
CloneConstructorExample e1 = new CloneConstructorExample();
|
||||
CloneConstructorExample e2 = new CloneConstructorExample(e1);
|
||||
e1.set(2, 222);
|
||||
System.out.println(e2.get(2)); // 2
|
||||
```
|
||||
BIN
Java基础教程/Java语言基础/image/2022-07-11-15-48-30.png
Normal file
|
After Width: | Height: | Size: 668 KiB |
BIN
Java基础教程/Java语言基础/image/2022-07-11-17-17-10.png
Normal file
|
After Width: | Height: | Size: 143 KiB |
BIN
Java基础教程/Java语言基础/image/2022-07-11-19-20-38.png
Normal file
|
After Width: | Height: | Size: 644 KiB |
BIN
Java基础教程/Java语言基础/image/2022-07-11-22-24-04.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
115
Java工具教程/maven教程/1 maven教程.md
Normal file
@@ -0,0 +1,115 @@
|
||||
## 1 maven基本概念
|
||||
|
||||
### 概念
|
||||
|
||||
1. 项目对象模型(Project Object Management,POM)。Maven 是一个项目管理工具,可以对 Java 项目进行构建、依赖管理。Maven利用一个中央信息片断能管理一个项目的构建、报告和文档等步骤。
|
||||
|
||||

|
||||
|
||||
|
||||
### 作用
|
||||
|
||||
1. 项目构建。提供标准的跨平台的项目构建方法。
|
||||
2. 依赖管理。方便快捷地管理项目依赖的资源,避免资源间的版本冲突。
|
||||
3. 统一开发结构。提供标准的、统一的项目结构。
|
||||
|
||||
|
||||
### 仓库
|
||||
* 本地仓库:在本地维护的maven的仓库。
|
||||
* 远程仓库:不在电脑上的。
|
||||
* 中央仓库:maven维护的服务器上的仓库。
|
||||
* 私服仓库:在局域网内维护的仓库。一方面是快,小范围内进行共享的资源。
|
||||
|
||||
|
||||
|
||||
### 坐标
|
||||
坐标的组成。坐标也是仓库中存放包的路径。
|
||||
* groupId:定义当前maven项目所属的组织名称,域名反写
|
||||
* artifactId:定义当前maven项目的名称。通常是模块名字
|
||||
* version:定义当前版本号。
|
||||
|
||||
> packaging 能够规定打包方式。例如可以打包成jar/war
|
||||
|
||||
使用唯一标识。定位资源的位置。
|
||||
|
||||
### 镜像
|
||||
|
||||
* 在maven目录conf下的setting.xml中可以配置全局镜像mirrors
|
||||
* 在.m2目录下的setting.xml中可以配置用户镜像mirrors
|
||||
|
||||
|
||||
|
||||
|
||||
## 2 Maven项目构建
|
||||
|
||||
|
||||
### 工程目录结构
|
||||
|
||||
```
|
||||
工程-项目-src源代码+target编译结果-main+test-java+resource-groupId-fileID
|
||||
```
|
||||
|
||||
1. 最顶层是工程,次顶层是模块或项目,可以自行编译执行的模块或项目。模块或项目下有src和target目录,即源代码和编译生成的代码。
|
||||

|
||||
|
||||
|
||||
2. 在src同层目录下创建pom.xml。即模块或项目的顶层目录下使用pom.xml进行配置。
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ykl</groupId>
|
||||
<artifactId>project-maven</artifactId>
|
||||
<version>1.0.2</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
```
|
||||
|
||||
|
||||
### maven命令
|
||||
|
||||
* mvn compile 下载插件、下载依赖、编译项目的源代码、将编译后的代码放到target目录下。
|
||||
* mvn clean 删除target目录,即本项目编译生成的文件。
|
||||
* mvn test 下载对应插件,编译后,运行Test目录下的测试脚本。
|
||||
* mvn package 首先进行compile,然后进行test,最后打包程序。
|
||||
* mvn install 把打包好的jar包放到仓库里。一次运行compile/test/package命令,最后将jar包安装到本地仓库中。
|
||||
|
||||
|
||||
### maven创建工程
|
||||
maven提供了工程创建的命令
|
||||
1. 创建一个java工程
|
||||
```shell
|
||||
mvn archetype:generate -DgroupId=com.demo -DartifactId=javaproject -DarchetypeArtifactId=maven-archetype-quickstart -Dversion=0.0.1-snapshot -DinteractiveMode=false
|
||||
```
|
||||
2. 创建一个web工程
|
||||
|
||||
```
|
||||
mvn archetype:generate -DgroupId=com.demo -DartifactId=webproject -DarchetypeArtifactId=maven-archetype-webapp -Dversion=0.0.1-snapshot -DinteractiveMode=false
|
||||
```
|
||||
|
||||

|
||||
|
||||
|
||||
### idea创建maven工程
|
||||
|
||||
1. 需要自己指定源代码、测试代码、源代码资源文件和测试资源文件。
|
||||
2. 可以在idea中自动创建启动参数。edit configuration
|
||||
3. 使用原型创建Maven模块。选择不同的Maven原型文件。
|
||||
|
||||
|
||||
### idea创建web项目
|
||||
|
||||
1. 直接在web中添加tomcat插件,即可在本地展示网站。
|
||||
|
||||
BIN
Java工具教程/maven教程/image/2022-07-11-10-36-37.png
Normal file
|
After Width: | Height: | Size: 303 KiB |
BIN
Java工具教程/maven教程/image/2022-07-11-11-40-25.png
Normal file
|
After Width: | Height: | Size: 47 KiB |
BIN
Java工具教程/maven教程/image/2022-07-11-11-56-50.png
Normal file
|
After Width: | Height: | Size: 70 KiB |
BIN
Java工具教程/maven教程/image/2022-07-11-13-20-18.png
Normal file
|
After Width: | Height: | Size: 427 KiB |
21
Java工具教程/maven教程/project/project-maven/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ykl</groupId>
|
||||
<artifactId>project-maven</artifactId>
|
||||
<version>1.0.2</version>
|
||||
|
||||
<packaging>jar</packaging>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ykl;
|
||||
|
||||
|
||||
public class Demo{
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
public String say(String name) {
|
||||
System.out.println("hello"+name);
|
||||
|
||||
return "hello "+name;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ykl;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.Assert;
|
||||
public class TestDemo {
|
||||
@Test
|
||||
public void testSay(){
|
||||
Demo d = new Demo();
|
||||
String ret = d.say("world");
|
||||
Assert.assertEquals("hello world", ret);
|
||||
}
|
||||
}
|
||||
10
Java源代码/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Zeppelin ignored files
|
||||
/ZeppelinRemoteNotebooks/
|
||||
13
Java源代码/.idea/ConfPoetryConfig.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ConfPoetryConfig">
|
||||
<option name="pathRules">
|
||||
<list>
|
||||
<option value=".*/config/[^/]+/[^/]+/((env)|(drm)|(log)|(meta)|(scheduler)|(serviceGroup)|(zdal)|(ci))/[^/]+" />
|
||||
<option value=".*/config/[^/]+/dbSql/[^/]+" />
|
||||
<option value=".*/conf/iac/[^/]+/((env)|(drm)|(log)|(meta)|(scheduler)|(serviceGroup)|(zdal)|(ci)|(sofamq)|(database))/[^/]+" />
|
||||
<option value=".*/conf/iac/[^/]+/msg/(pub|sub)/[^/]+" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
9
Java源代码/.idea/Java源代码.iml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
33
Java源代码/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,33 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="IncorrectHttpHeaderInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="customHeaders">
|
||||
<set>
|
||||
<option value="SOFA-Tenant" />
|
||||
<option value="DRM-PushMode" />
|
||||
<option value="DRM-DataFormat" />
|
||||
<option value="DRM-Zones" />
|
||||
<option value="DRM-Ips" />
|
||||
<option value="DRM-Profiles" />
|
||||
<option value="RPC-Url" />
|
||||
<option value="RPC-UniqueId" />
|
||||
<option value="RPC-SofaContext" />
|
||||
<option value="RPC-SofaGroup" />
|
||||
<option value="Scheduler-JobRunMode" />
|
||||
<option value="Scheduler-Zone" />
|
||||
<option value="Scheduler-JobAppName" />
|
||||
<option value="MsgBroker-Type" />
|
||||
<option value="MsgBroker-Zone" />
|
||||
<option value="MsgBroker-PayloadClazz" />
|
||||
<option value="MsgBroker-GroupId" />
|
||||
<option value="MsgBroker-Dependencies" />
|
||||
<option value="MsgBroker-Properties" />
|
||||
<option value="MsgBroker-TargetNode" />
|
||||
<option value="MsgBroker-ZoneUid" />
|
||||
<option value="MsgBroker-DevGroup" />
|
||||
</set>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
6
Java源代码/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
9
Java源代码/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Java源代码.iml" filepath="$PROJECT_DIR$/Java源代码.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/Lesson02/Lesson02.iml" filepath="$PROJECT_DIR$/Lesson02/Lesson02.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
Java源代码/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
10
Java源代码/Lesson03/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Zeppelin ignored files
|
||||
/ZeppelinRemoteNotebooks/
|
||||
13
Java源代码/Lesson03/.idea/ConfPoetryConfig.xml
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ConfPoetryConfig">
|
||||
<option name="pathRules">
|
||||
<list>
|
||||
<option value=".*/config/[^/]+/[^/]+/((env)|(drm)|(log)|(meta)|(scheduler)|(serviceGroup)|(zdal)|(ci))/[^/]+" />
|
||||
<option value=".*/config/[^/]+/dbSql/[^/]+" />
|
||||
<option value=".*/conf/iac/[^/]+/((env)|(drm)|(log)|(meta)|(scheduler)|(serviceGroup)|(zdal)|(ci)|(sofamq)|(database))/[^/]+" />
|
||||
<option value=".*/conf/iac/[^/]+/msg/(pub|sub)/[^/]+" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
15
Java源代码/Lesson03/.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="web-project" />
|
||||
<module name="basicLesson" />
|
||||
<module name="untitled" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
||||
7
Java源代码/Lesson03/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/web-project/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/web-project/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
33
Java源代码/Lesson03/.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,33 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="IncorrectHttpHeaderInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="customHeaders">
|
||||
<set>
|
||||
<option value="SOFA-Tenant" />
|
||||
<option value="DRM-PushMode" />
|
||||
<option value="DRM-DataFormat" />
|
||||
<option value="DRM-Zones" />
|
||||
<option value="DRM-Ips" />
|
||||
<option value="DRM-Profiles" />
|
||||
<option value="RPC-Url" />
|
||||
<option value="RPC-UniqueId" />
|
||||
<option value="RPC-SofaContext" />
|
||||
<option value="RPC-SofaGroup" />
|
||||
<option value="Scheduler-JobRunMode" />
|
||||
<option value="Scheduler-Zone" />
|
||||
<option value="Scheduler-JobAppName" />
|
||||
<option value="MsgBroker-Type" />
|
||||
<option value="MsgBroker-Zone" />
|
||||
<option value="MsgBroker-PayloadClazz" />
|
||||
<option value="MsgBroker-GroupId" />
|
||||
<option value="MsgBroker-Dependencies" />
|
||||
<option value="MsgBroker-Properties" />
|
||||
<option value="MsgBroker-TargetNode" />
|
||||
<option value="MsgBroker-ZoneUid" />
|
||||
<option value="MsgBroker-DevGroup" />
|
||||
</set>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
35
Java源代码/Lesson03/.idea/jarRepositories.xml
generated
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="nexus-server@alipay" />
|
||||
<option name="name" value="nexus-server@alipay" />
|
||||
<option name="url" value="http://mvn.test.alipay.net:8080/artifactory/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="snapshots" />
|
||||
<option name="name" value="snapshots" />
|
||||
<option name="url" value="http://mvn.dev.alipay.net:8080/artifactory/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="central" />
|
||||
<option name="url" value="http://mvn.dev.alipay.net:8080/artifactory/repo" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="alibaba" />
|
||||
<option name="name" value="alibaba" />
|
||||
<option name="url" value="http://mvnrepo.alibaba-inc.com/mvn/repository" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
19
Java源代码/Lesson03/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$/web-project" />
|
||||
</component>
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/basicLesson/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/untitled/pom.xml" />
|
||||
<option value="$PROJECT_DIR$/web-project/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
Java源代码/Lesson03/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/Lesson03.iml" filepath="$PROJECT_DIR$/Lesson03.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
Java源代码/Lesson03/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
12
Java源代码/Lesson03/basicLesson/pom.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>basicLesson</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,17 @@
|
||||
/**
|
||||
* Alipay.com Inc.
|
||||
* Copyright (c) 2004-2022 All Rights Reserved.
|
||||
*/
|
||||
package com.ykl;
|
||||
|
||||
/**
|
||||
* @author yinkanglong
|
||||
* @version : Application, v 0.1 2022-07-11 09:20 yinkanglong Exp $
|
||||
*/
|
||||
public class Application {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("hello world");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* Alipay.com Inc.
|
||||
* Copyright (c) 2004-2022 All Rights Reserved.
|
||||
*/
|
||||
package com.ykl;
|
||||
|
||||
/**
|
||||
* @author yinkanglong
|
||||
* @version : ExceptionTest, v 0.1 2022-07-11 19:45 yinkanglong Exp $
|
||||
*/
|
||||
public class ExceptionTest {
|
||||
|
||||
public static void main(String args[]) {
|
||||
int a[] = new int[2];
|
||||
try {
|
||||
System.out.println("Access element three :" + a[3]);
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
System.out.println("Exception thrown :" + e);
|
||||
return ;
|
||||
} finally {
|
||||
a[0] = 6;
|
||||
System.out.println("First element value: " + a[0]);
|
||||
System.out.println("The finally statement is executed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
12
Java源代码/Lesson03/untitled/pom.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>untitled</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
|
||||
</project>
|
||||
67
Java源代码/Lesson03/web-project/pom.xml
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.example</groupId>
|
||||
<artifactId>web-project</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<name>web-project Maven Webapp</name>
|
||||
<!-- FIXME change it to the project's website -->
|
||||
<url>http://www.example.com</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>1.7</maven.compiler.source>
|
||||
<maven.compiler.target>1.7</maven.compiler.target>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>web-project</finalName>
|
||||
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.22.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.2.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</project>
|
||||
@@ -0,0 +1,7 @@
|
||||
<!DOCTYPE web-app PUBLIC
|
||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||
"http://java.sun.com/dtd/web-app_2_3.dtd" >
|
||||
|
||||
<web-app>
|
||||
<display-name>Archetype Created Web Application</display-name>
|
||||
</web-app>
|
||||
5
Java源代码/Lesson03/web-project/src/main/webapp/index.jsp
Normal file
@@ -0,0 +1,5 @@
|
||||
<html>
|
||||
<body>
|
||||
<h2>Hello World!</h2>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>所有类</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">所有类</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="com/ykl/Demo5.html" title="com.ykl中的类" target="classFrame">Demo5</a></li>
|
||||
<li><a href="com/ykl/HelloWorld.html" title="com.ykl中的类" target="classFrame">HelloWorld</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>所有类</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1 class="bar">所有类</h1>
|
||||
<div class="indexContainer">
|
||||
<ul>
|
||||
<li><a href="com/ykl/Demo5.html" title="com.ykl中的类">Demo5</a></li>
|
||||
<li><a href="com/ykl/HelloWorld.html" title="com.ykl中的类">HelloWorld</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,123 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>常量字段值</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u5E38\u91CF\u5B57\u6BB5\u503C";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">框架</a></li>
|
||||
<li><a href="constant-values.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="常量字段值" class="title">常量字段值</h1>
|
||||
<h2 title="目录">目录</h2>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?constant-values.html" target="_top">框架</a></li>
|
||||
<li><a href="constant-values.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,123 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>已过时的列表</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u5DF2\u8FC7\u65F6\u7684\u5217\u8868";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li class="navBarCell1Rev">已过时</li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">框架</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 title="已过时的 API" class="title">已过时的 API</h1>
|
||||
<h2 title="目录">目录</h2>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li class="navBarCell1Rev">已过时</li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?deprecated-list.html" target="_top">框架</a></li>
|
||||
<li><a href="deprecated-list.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,224 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>API 帮助</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="API \u5E2E\u52A9";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li class="navBarCell1Rev">帮助</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">框架</a></li>
|
||||
<li><a href="help-doc.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">此 API 文档的组织方式</h1>
|
||||
<div class="subTitle">此 API (应用程序编程接口) 文档包含对应于导航栏中的项目的页面, 如下所述。</div>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<ul class="blockList">
|
||||
<li class="blockList">
|
||||
<h2>程序包</h2>
|
||||
<p>每个程序包都有一个页面, 其中包含它的类和接口的列表及其概要。此页面可以包含六个类别:</p>
|
||||
<ul>
|
||||
<li>接口 (斜体)</li>
|
||||
<li>类</li>
|
||||
<li>枚举</li>
|
||||
<li>异常错误</li>
|
||||
<li>错误</li>
|
||||
<li>注释类型</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>类/接口</h2>
|
||||
<p>每个类, 接口, 嵌套类和嵌套接口都有各自的页面。其中每个页面都由三部分 (类/接口说明, 概要表, 以及详细的成员说明) 组成:</p>
|
||||
<ul>
|
||||
<li>类继承图</li>
|
||||
<li>直接子类</li>
|
||||
<li>所有已知子接口</li>
|
||||
<li>所有已知实现类</li>
|
||||
<li>类/接口声明</li>
|
||||
<li>类/接口说明</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>嵌套类概要</li>
|
||||
<li>字段概要</li>
|
||||
<li>构造器概要</li>
|
||||
<li>方法概要</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li>字段详细资料</li>
|
||||
<li>构造器详细资料</li>
|
||||
<li>方法详细资料</li>
|
||||
</ul>
|
||||
<p>每个概要条目都包含该项目的详细说明的第一句。概要条目按字母顺序排列, 而详细说明则按其在源代码中出现的顺序排列。这样保持了程序员所建立的逻辑分组。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>注释类型</h2>
|
||||
<p>每个注释类型都有各自的页面, 其中包含以下部分:</p>
|
||||
<ul>
|
||||
<li>注释类型声明</li>
|
||||
<li>注释类型说明</li>
|
||||
<li>必需元素概要</li>
|
||||
<li>可选元素概要</li>
|
||||
<li>元素详细资料</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>枚举</h2>
|
||||
<p>每个枚举都有各自的页面, 其中包含以下部分:</p>
|
||||
<ul>
|
||||
<li>枚举声明</li>
|
||||
<li>枚举说明</li>
|
||||
<li>枚举常量概要</li>
|
||||
<li>枚举常量详细资料</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>使用</h2>
|
||||
<p>每个已文档化的程序包, 类和接口都有各自的“使用”页面。此页面介绍了使用给定类或程序包的任何部分的程序包, 类, 方法, 构造器和字段。对于给定的类或接口 A, 其“使用”页面包含 A 的子类, 声明为 A 的字段, 返回 A 的方法, 以及带有类型为 A 的参数的方法和构造器。访问此页面的方法是: 首先转至程序包, 类或接口, 然后单击导航栏中的 "使用" 链接。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>树 (类分层结构)</h2>
|
||||
<p>对于所有程序包, 有一个<a href="overview-tree.html">类分层结构</a>页面, 以及每个程序包的分层结构。每个分层结构页面都包含类的列表和接口的列表。从<code>java.lang.Object</code>开始, 按继承结构对类进行排列。接口不从<code>java.lang.Object</code>继承。</p>
|
||||
<ul>
|
||||
<li>查看“概览”页面时, 单击 "树" 将显示所有程序包的分层结构。</li>
|
||||
<li>查看特定程序包, 类或接口页面时, 单击 "树" 将仅显示该程序包的分层结构。</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>已过时的 API</h2>
|
||||
<p><a href="deprecated-list.html">已过时的 API</a> 页面列出了所有已过时的 API。一般由于进行了改进并且通常提供了替代的 API, 所以建议不要使用已过时的 API。在将来的实现过程中, 可能会删除已过时的 API。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>索引</h2>
|
||||
<p><a href="index-files/index-1.html">索引</a> 包含按字母顺序排列的所有类, 接口, 构造器, 方法和字段的列表。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>上一个/下一个</h2>
|
||||
<p>这些链接使您可以转至下一个或上一个类, 接口, 程序包或相关页面。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>框架/无框架</h2>
|
||||
<p>这些链接用于显示和隐藏 HTML 框架。所有页面均具有有框架和无框架两种显示方式。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>所有类</h2>
|
||||
<p><a href="allclasses-noframe.html">所有类</a>链接显示所有类和接口 (除了非静态嵌套类型)。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>序列化表格</h2>
|
||||
<p>每个可序列化或可外部化的类都有其序列化字段和方法的说明。此信息对重新实现者有用, 而对使用 API 的开发者则没有什么用处。尽管导航栏中没有链接, 但您可以通过下列方式获取此信息: 转至任何序列化类, 然后单击类说明的 "另请参阅" 部分中的 "序列化表格"。</p>
|
||||
</li>
|
||||
<li class="blockList">
|
||||
<h2>常量字段值</h2>
|
||||
<p><a href="constant-values.html">常量字段值</a>页面列出了静态最终字段及其值。</p>
|
||||
</li>
|
||||
</ul>
|
||||
<span class="emphasizedPhrase">此帮助文件适用于使用标准 doclet 生成的 API 文档。</span></div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li><a href="overview-tree.html">树</a></li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li class="navBarCell1Rev">帮助</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?help-doc.html" target="_top">框架</a></li>
|
||||
<li><a href="help-doc.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>生成的文档 (无标题)</title>
|
||||
<script type="text/javascript">
|
||||
tmpTargetPage = "" + window.location.search;
|
||||
if (tmpTargetPage != "" && tmpTargetPage != "undefined")
|
||||
tmpTargetPage = tmpTargetPage.substring(1);
|
||||
if (tmpTargetPage.indexOf(":") != -1 || (tmpTargetPage != "" && !validURL(tmpTargetPage)))
|
||||
tmpTargetPage = "undefined";
|
||||
targetPage = tmpTargetPage;
|
||||
function validURL(url) {
|
||||
try {
|
||||
url = decodeURIComponent(url);
|
||||
}
|
||||
catch (error) {
|
||||
return false;
|
||||
}
|
||||
var pos = url.indexOf(".html");
|
||||
if (pos == -1 || pos != url.length - 5)
|
||||
return false;
|
||||
var allowNumber = false;
|
||||
var allowSep = false;
|
||||
var seenDot = false;
|
||||
for (var i = 0; i < url.length - 5; i++) {
|
||||
var ch = url.charAt(i);
|
||||
if ('a' <= ch && ch <= 'z' ||
|
||||
'A' <= ch && ch <= 'Z' ||
|
||||
ch == '$' ||
|
||||
ch == '_' ||
|
||||
ch.charCodeAt(0) > 127) {
|
||||
allowNumber = true;
|
||||
allowSep = true;
|
||||
} else if ('0' <= ch && ch <= '9'
|
||||
|| ch == '-') {
|
||||
if (!allowNumber)
|
||||
return false;
|
||||
} else if (ch == '/' || ch == '.') {
|
||||
if (!allowSep)
|
||||
return false;
|
||||
allowNumber = false;
|
||||
allowSep = false;
|
||||
if (ch == '.')
|
||||
seenDot = true;
|
||||
if (ch == '/' && seenDot)
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function loadFrames() {
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
top.classFrame.location = top.targetPage;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
|
||||
<frame src="allclasses-frame.html" name="packageFrame" title="所有类和接口 (除了非静态嵌套类型)">
|
||||
<frame src="com/ykl/package-summary.html" name="classFrame" title="程序包, 类和接口说明" scrolling="yes">
|
||||
<noframes>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<h2>框架预警</h2>
|
||||
<p>请使用框架功能查看此文档。如果看到此消息, 则表明您使用的是不支持框架的 Web 客户机。链接到<a href="com/ykl/package-summary.html">非框架版本</a>。</p>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
@@ -1,137 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- NewPage -->
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<!-- Generated by javadoc (1.8.0_333) on Sun Jul 10 18:03:14 CST 2022 -->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>类分层结构</title>
|
||||
<meta name="date" content="2022-07-10">
|
||||
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
|
||||
<script type="text/javascript" src="script.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript"><!--
|
||||
try {
|
||||
if (location.href.indexOf('is-external=true') == -1) {
|
||||
parent.document.title="\u7C7B\u5206\u5C42\u7ED3\u6784";
|
||||
}
|
||||
}
|
||||
catch(err) {
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
<noscript>
|
||||
<div>您的浏览器已禁用 JavaScript。</div>
|
||||
</noscript>
|
||||
<!-- ========= START OF TOP NAVBAR ======= -->
|
||||
<div class="topNav"><a name="navbar.top">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.top.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li class="navBarCell1Rev">树</li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">框架</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_top">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_top");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.top">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ========= END OF TOP NAVBAR ========= -->
|
||||
<div class="header">
|
||||
<h1 class="title">所有程序包的分层结构</h1>
|
||||
<span class="packageHierarchyLabel">程序包分层结构:</span>
|
||||
<ul class="horizontal">
|
||||
<li><a href="com/ykl/package-tree.html">com.ykl</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="contentContainer">
|
||||
<h2 title="类分层结构">类分层结构</h2>
|
||||
<ul>
|
||||
<li type="circle">java.lang.Object
|
||||
<ul>
|
||||
<li type="circle">com.ykl.<a href="com/ykl/Demo5.html" title="com.ykl中的类"><span class="typeNameLink">Demo5</span></a></li>
|
||||
<li type="circle">com.ykl.<a href="com/ykl/HelloWorld.html" title="com.ykl中的类"><span class="typeNameLink">HelloWorld</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- ======= START OF BOTTOM NAVBAR ====== -->
|
||||
<div class="bottomNav"><a name="navbar.bottom">
|
||||
<!-- -->
|
||||
</a>
|
||||
<div class="skipNav"><a href="#skip.navbar.bottom" title="跳过导航链接">跳过导航链接</a></div>
|
||||
<a name="navbar.bottom.firstrow">
|
||||
<!-- -->
|
||||
</a>
|
||||
<ul class="navList" title="导航">
|
||||
<li><a href="com/ykl/package-summary.html">程序包</a></li>
|
||||
<li>类</li>
|
||||
<li>使用</li>
|
||||
<li class="navBarCell1Rev">树</li>
|
||||
<li><a href="deprecated-list.html">已过时</a></li>
|
||||
<li><a href="index-files/index-1.html">索引</a></li>
|
||||
<li><a href="help-doc.html">帮助</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="subNav">
|
||||
<ul class="navList">
|
||||
<li>上一个</li>
|
||||
<li>下一个</li>
|
||||
</ul>
|
||||
<ul class="navList">
|
||||
<li><a href="index.html?overview-tree.html" target="_top">框架</a></li>
|
||||
<li><a href="overview-tree.html" target="_top">无框架</a></li>
|
||||
</ul>
|
||||
<ul class="navList" id="allclasses_navbar_bottom">
|
||||
<li><a href="allclasses-noframe.html">所有类</a></li>
|
||||
</ul>
|
||||
<div>
|
||||
<script type="text/javascript"><!--
|
||||
allClassesLink = document.getElementById("allclasses_navbar_bottom");
|
||||
if(window==top) {
|
||||
allClassesLink.style.display = "block";
|
||||
}
|
||||
else {
|
||||
allClassesLink.style.display = "none";
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
</div>
|
||||
<a name="skip.navbar.bottom">
|
||||
<!-- -->
|
||||
</a></div>
|
||||
<!-- ======== END OF BOTTOM NAVBAR ======= -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
com.ykl
|
||||
@@ -1,30 +0,0 @@
|
||||
function show(type)
|
||||
{
|
||||
count = 0;
|
||||
for (var key in methods) {
|
||||
var row = document.getElementById(key);
|
||||
if ((methods[key] & type) != 0) {
|
||||
row.style.display = '';
|
||||
row.className = (count++ % 2) ? rowColor : altColor;
|
||||
}
|
||||
else
|
||||
row.style.display = 'none';
|
||||
}
|
||||
updateTabs(type);
|
||||
}
|
||||
|
||||
function updateTabs(type)
|
||||
{
|
||||
for (var value in tabs) {
|
||||
var sNode = document.getElementById(tabs[value][0]);
|
||||
var spanNode = sNode.firstChild;
|
||||
if (value == type) {
|
||||
sNode.className = activeTableTab;
|
||||
spanNode.innerHTML = tabs[value][1];
|
||||
}
|
||||
else {
|
||||
sNode.className = tableTab;
|
||||
spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,574 +0,0 @@
|
||||
/* Javadoc style sheet */
|
||||
/*
|
||||
Overall document style
|
||||
*/
|
||||
|
||||
@import url('resources/fonts/dejavu.css');
|
||||
|
||||
body {
|
||||
background-color:#ffffff;
|
||||
color:#353833;
|
||||
font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
|
||||
font-size:14px;
|
||||
margin:0;
|
||||
}
|
||||
a:link, a:visited {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a:hover, a:focus {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
}
|
||||
a:active {
|
||||
text-decoration:none;
|
||||
color:#4A6782;
|
||||
}
|
||||
a[name] {
|
||||
color:#353833;
|
||||
}
|
||||
a[name]:hover {
|
||||
text-decoration:none;
|
||||
color:#353833;
|
||||
}
|
||||
pre {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
}
|
||||
h1 {
|
||||
font-size:20px;
|
||||
}
|
||||
h2 {
|
||||
font-size:18px;
|
||||
}
|
||||
h3 {
|
||||
font-size:16px;
|
||||
font-style:italic;
|
||||
}
|
||||
h4 {
|
||||
font-size:13px;
|
||||
}
|
||||
h5 {
|
||||
font-size:12px;
|
||||
}
|
||||
h6 {
|
||||
font-size:11px;
|
||||
}
|
||||
ul {
|
||||
list-style-type:disc;
|
||||
}
|
||||
code, tt {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
margin-top:8px;
|
||||
line-height:1.4em;
|
||||
}
|
||||
dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
padding-top:4px;
|
||||
}
|
||||
table tr td dt code {
|
||||
font-family:'DejaVu Sans Mono', monospace;
|
||||
font-size:14px;
|
||||
vertical-align:top;
|
||||
padding-top:4px;
|
||||
}
|
||||
sup {
|
||||
font-size:8px;
|
||||
}
|
||||
/*
|
||||
Document title and Copyright styles
|
||||
*/
|
||||
.clear {
|
||||
clear:both;
|
||||
height:0px;
|
||||
overflow:hidden;
|
||||
}
|
||||
.aboutLanguage {
|
||||
float:right;
|
||||
padding:0px 21px;
|
||||
font-size:11px;
|
||||
z-index:200;
|
||||
margin-top:-9px;
|
||||
}
|
||||
.legalCopy {
|
||||
margin-left:.5em;
|
||||
}
|
||||
.bar a, .bar a:link, .bar a:visited, .bar a:active {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
}
|
||||
.bar a:hover, .bar a:focus {
|
||||
color:#bb7a2a;
|
||||
}
|
||||
.tab {
|
||||
background-color:#0066FF;
|
||||
color:#ffffff;
|
||||
padding:8px;
|
||||
width:5em;
|
||||
font-weight:bold;
|
||||
}
|
||||
/*
|
||||
Navigation bar styles
|
||||
*/
|
||||
.bar {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
padding:.8em .5em .4em .8em;
|
||||
height:auto;/*height:1.8em;*/
|
||||
font-size:11px;
|
||||
margin:0;
|
||||
}
|
||||
.topNav {
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.bottomNav {
|
||||
margin-top:10px;
|
||||
background-color:#4D7A97;
|
||||
color:#FFFFFF;
|
||||
float:left;
|
||||
padding:0;
|
||||
width:100%;
|
||||
clear:right;
|
||||
height:2.8em;
|
||||
padding-top:10px;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.subNav {
|
||||
background-color:#dee3e9;
|
||||
float:left;
|
||||
width:100%;
|
||||
overflow:hidden;
|
||||
font-size:12px;
|
||||
}
|
||||
.subNav div {
|
||||
clear:left;
|
||||
float:left;
|
||||
padding:0 0 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
ul.navList, ul.subNavList {
|
||||
float:left;
|
||||
margin:0 25px 0 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.navList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
padding: 5px 6px;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
ul.subNavList li{
|
||||
list-style:none;
|
||||
float:left;
|
||||
}
|
||||
.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
|
||||
color:#FFFFFF;
|
||||
text-decoration:none;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.topNav a:hover, .bottomNav a:hover {
|
||||
text-decoration:none;
|
||||
color:#bb7a2a;
|
||||
text-transform:uppercase;
|
||||
}
|
||||
.navBarCell1Rev {
|
||||
background-color:#F8981D;
|
||||
color:#253441;
|
||||
margin: auto 5px;
|
||||
}
|
||||
.skipNav {
|
||||
position:absolute;
|
||||
top:auto;
|
||||
left:-9999px;
|
||||
overflow:hidden;
|
||||
}
|
||||
/*
|
||||
Page header and footer styles
|
||||
*/
|
||||
.header, .footer {
|
||||
clear:both;
|
||||
margin:0 20px;
|
||||
padding:5px 0 0 0;
|
||||
}
|
||||
.indexHeader {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
}
|
||||
.indexHeader span{
|
||||
margin-right:15px;
|
||||
}
|
||||
.indexHeader h1 {
|
||||
font-size:13px;
|
||||
}
|
||||
.title {
|
||||
color:#2c4557;
|
||||
margin:10px 0;
|
||||
}
|
||||
.subTitle {
|
||||
margin:5px 0 0 0;
|
||||
}
|
||||
.header ul {
|
||||
margin:0 0 15px 0;
|
||||
padding:0;
|
||||
}
|
||||
.footer ul {
|
||||
margin:20px 0 5px 0;
|
||||
}
|
||||
.header ul li, .footer ul li {
|
||||
list-style:none;
|
||||
font-size:13px;
|
||||
}
|
||||
/*
|
||||
Heading styles
|
||||
*/
|
||||
div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
background-color:#dee3e9;
|
||||
border:1px solid #d0d9e0;
|
||||
margin:0 0 6px -8px;
|
||||
padding:7px 5px;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList h3 {
|
||||
padding:0;
|
||||
margin:15px 0;
|
||||
}
|
||||
ul.blockList li.blockList h2 {
|
||||
padding:0px 0 20px 0;
|
||||
}
|
||||
/*
|
||||
Page layout container styles
|
||||
*/
|
||||
.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
|
||||
clear:both;
|
||||
padding:10px 20px;
|
||||
position:relative;
|
||||
}
|
||||
.indexContainer {
|
||||
margin:10px;
|
||||
position:relative;
|
||||
font-size:12px;
|
||||
}
|
||||
.indexContainer h2 {
|
||||
font-size:13px;
|
||||
padding:0 0 3px 0;
|
||||
}
|
||||
.indexContainer ul {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
.indexContainer ul li {
|
||||
list-style:none;
|
||||
padding-top:2px;
|
||||
}
|
||||
.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
|
||||
font-size:12px;
|
||||
font-weight:bold;
|
||||
margin:10px 0 0 0;
|
||||
color:#4E4E4E;
|
||||
}
|
||||
.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
|
||||
margin:5px 0 10px 0px;
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Sans Mono',monospace;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dt {
|
||||
margin-left:1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
font-weight:bold;
|
||||
}
|
||||
.serializedFormContainer dl.nameValue dd {
|
||||
margin:0 0 0 1px;
|
||||
font-size:1.1em;
|
||||
display:inline;
|
||||
}
|
||||
/*
|
||||
List styles
|
||||
*/
|
||||
ul.horizontal li {
|
||||
display:inline;
|
||||
font-size:0.9em;
|
||||
}
|
||||
ul.inheritance {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
ul.inheritance li {
|
||||
display:inline;
|
||||
list-style:none;
|
||||
}
|
||||
ul.inheritance li ul.inheritance {
|
||||
margin-left:15px;
|
||||
padding-left:15px;
|
||||
padding-top:1px;
|
||||
}
|
||||
ul.blockList, ul.blockListLast {
|
||||
margin:10px 0 10px 0;
|
||||
padding:0;
|
||||
}
|
||||
ul.blockList li.blockList, ul.blockListLast li.blockList {
|
||||
list-style:none;
|
||||
margin-bottom:15px;
|
||||
line-height:1.4;
|
||||
}
|
||||
ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0px 20px 5px 10px;
|
||||
border:1px solid #ededed;
|
||||
background-color:#f8f8f8;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
|
||||
padding:0 0 5px 8px;
|
||||
background-color:#ffffff;
|
||||
border:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
|
||||
margin-left:0;
|
||||
padding-left:0;
|
||||
padding-bottom:15px;
|
||||
border:none;
|
||||
}
|
||||
ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
|
||||
list-style:none;
|
||||
border-bottom:none;
|
||||
padding-bottom:0;
|
||||
}
|
||||
table tr td dl, table tr td dl dt, table tr td dl dd {
|
||||
margin-top:0;
|
||||
margin-bottom:1px;
|
||||
}
|
||||
/*
|
||||
Table styles
|
||||
*/
|
||||
.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
|
||||
width:100%;
|
||||
border-left:1px solid #EEE;
|
||||
border-right:1px solid #EEE;
|
||||
border-bottom:1px solid #EEE;
|
||||
}
|
||||
.overviewSummary, .memberSummary {
|
||||
padding:0px;
|
||||
}
|
||||
.overviewSummary caption, .memberSummary caption, .typeSummary caption,
|
||||
.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
|
||||
position:relative;
|
||||
text-align:left;
|
||||
background-repeat:no-repeat;
|
||||
color:#253441;
|
||||
font-weight:bold;
|
||||
clear:none;
|
||||
overflow:hidden;
|
||||
padding:0px;
|
||||
padding-top:10px;
|
||||
padding-left:1px;
|
||||
margin:0px;
|
||||
white-space:pre;
|
||||
}
|
||||
.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
|
||||
.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
|
||||
.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
|
||||
.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
|
||||
.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
|
||||
.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
|
||||
.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
|
||||
.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
|
||||
color:#FFFFFF;
|
||||
}
|
||||
.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
|
||||
.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
padding-bottom:7px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
border: none;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.activeTableTab span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
margin-right:3px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.tableTab span {
|
||||
white-space:nowrap;
|
||||
padding-top:5px;
|
||||
padding-left:12px;
|
||||
padding-right:12px;
|
||||
margin-right:3px;
|
||||
display:inline-block;
|
||||
float:left;
|
||||
background-color:#4D7A97;
|
||||
height:16px;
|
||||
}
|
||||
.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
|
||||
padding-top:0px;
|
||||
padding-left:0px;
|
||||
padding-right:0px;
|
||||
background-image:none;
|
||||
float:none;
|
||||
display:inline;
|
||||
}
|
||||
.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
|
||||
.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
position:relative;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
}
|
||||
.memberSummary .activeTableTab .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
margin-right:3px;
|
||||
position:relative;
|
||||
float:left;
|
||||
background-color:#F8981D;
|
||||
}
|
||||
.memberSummary .tableTab .tabEnd {
|
||||
display:none;
|
||||
width:5px;
|
||||
margin-right:3px;
|
||||
position:relative;
|
||||
background-color:#4D7A97;
|
||||
float:left;
|
||||
|
||||
}
|
||||
.overviewSummary td, .memberSummary td, .typeSummary td,
|
||||
.useSummary td, .constantsSummary td, .deprecatedSummary td {
|
||||
text-align:left;
|
||||
padding:0px 0px 12px 10px;
|
||||
}
|
||||
th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
|
||||
td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
|
||||
vertical-align:top;
|
||||
padding-right:0px;
|
||||
padding-top:8px;
|
||||
padding-bottom:3px;
|
||||
}
|
||||
th.colFirst, th.colLast, th.colOne, .constantsSummary th {
|
||||
background:#dee3e9;
|
||||
text-align:left;
|
||||
padding:8px 3px 3px 7px;
|
||||
}
|
||||
td.colFirst, th.colFirst {
|
||||
white-space:nowrap;
|
||||
font-size:13px;
|
||||
}
|
||||
td.colLast, th.colLast {
|
||||
font-size:13px;
|
||||
}
|
||||
td.colOne, th.colOne {
|
||||
font-size:13px;
|
||||
}
|
||||
.overviewSummary td.colFirst, .overviewSummary th.colFirst,
|
||||
.useSummary td.colFirst, .useSummary th.colFirst,
|
||||
.overviewSummary td.colOne, .overviewSummary th.colOne,
|
||||
.memberSummary td.colFirst, .memberSummary th.colFirst,
|
||||
.memberSummary td.colOne, .memberSummary th.colOne,
|
||||
.typeSummary td.colFirst{
|
||||
width:25%;
|
||||
vertical-align:top;
|
||||
}
|
||||
td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
|
||||
font-weight:bold;
|
||||
}
|
||||
.tableSubHeadingColor {
|
||||
background-color:#EEEEFF;
|
||||
}
|
||||
.altColor {
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
.rowColor {
|
||||
background-color:#EEEEEF;
|
||||
}
|
||||
/*
|
||||
Content styles
|
||||
*/
|
||||
.description pre {
|
||||
margin-top:0;
|
||||
}
|
||||
.deprecatedContent {
|
||||
margin:0;
|
||||
padding:10px 0;
|
||||
}
|
||||
.docSummary {
|
||||
padding:0;
|
||||
}
|
||||
|
||||
ul.blockList ul.blockList ul.blockList li.blockList h3 {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
div.block {
|
||||
font-size:14px;
|
||||
font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
|
||||
}
|
||||
|
||||
td.colLast div {
|
||||
padding-top:0px;
|
||||
}
|
||||
|
||||
|
||||
td.colLast a {
|
||||
padding-bottom:3px;
|
||||
}
|
||||
/*
|
||||
Formatting effect styles
|
||||
*/
|
||||
.sourceLineNo {
|
||||
color:green;
|
||||
padding:0 30px 0 0;
|
||||
}
|
||||
h1.hidden {
|
||||
visibility:hidden;
|
||||
overflow:hidden;
|
||||
font-size:10px;
|
||||
}
|
||||
.block {
|
||||
display:block;
|
||||
margin:3px 10px 2px 0px;
|
||||
color:#474747;
|
||||
}
|
||||
.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
|
||||
.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
|
||||
.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink {
|
||||
font-weight:bold;
|
||||
}
|
||||
.deprecationComment, .emphasizedPhrase, .interfaceName {
|
||||
font-style:italic;
|
||||
}
|
||||
|
||||
div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
|
||||
div.block div.block span.interfaceName {
|
||||
font-style:normal;
|
||||
}
|
||||
|
||||
div.contentContainer ul.blockList li.blockList h2{
|
||||
padding-bottom:0px;
|
||||
}
|
||||