Javabase java reflection mechanism - dynamic agent - jdk dynamic agent (source code)
Javabase java reflection mechanism
Application of reflection: dynamic proxy
Dynamic agent overview
Principle of agent design pattern:
Wrap the object with a proxy object, and then replace the original object with the proxy object. Any call to the original object must be operated through the proxy object. The proxy object determines whethe ...
Added by billshackle on Fri, 18 Feb 2022 01:30:02 +0200
Responsibility chain design pattern of code refactoring
1, Responsibility chain model
1. What is the responsibility chain model
In the Chain of Responsibility Pattern, each receiver usually contains a reference to another receiver. If an object cannot process the request, it passes the same request to the next recipient, and so on.
Chain of responsibility model: multiple objects have the opportun ...
Added by Bisdale on Fri, 18 Feb 2022 01:12:59 +0200
Concurrent linkqueue Java programming
brief introduction
In concurrent programming, we sometimes need to use thread safe queues. If we want to implement a thread safe queue, there are two ways to implement it, one is to use blocking algorithm, the other is to use non blocking algorithm. The queue using blocking algorithm can be implemented by one lock (the same lock for queue entr ...
Added by freddyatlantis on Fri, 18 Feb 2022 00:50:27 +0200
Source code analysis of ArrayList and LinkedList
ArrayList and LinkedList design structure
Note:
The green solid line is the inheritance relationship between interfacesThe green dotted line is the class implementation interface relationshipBlue implementations are inheritance relationships between classes
1. ArrayList design structure
2. LinkedList design structure
3. Analyze the str ...
Added by Danosaur on Fri, 18 Feb 2022 00:35:48 +0200
Spring learning notes [All]
Learn about Spring
Official website: https://spring.io/projects/spring-framework#learn
Official download address: https://repo.spring.io/ui/native/release/org/springframework/spring
GitHub: https://github.com/spring-projects/spring-framework
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency&g ...
Added by ultrus on Fri, 18 Feb 2022 00:25:43 +0200
Integrated java and scala development environment using maven
Git address: https://gitee.com/jyq_18792721831/sparkmaven.git
Create Project
Let's start by creating a generic maven project
Create a project followed by a hello module
Is also a normal maven module
Increase scala dependency
We don't write code in the parent project, the parent project is just for managing the child project, so th ...
Added by ahundiak on Fri, 18 Feb 2022 00:15:40 +0200
Ten classical sorting algorithms
introduction:
Sorting algorithm is one of the most basic algorithms in data structure and algorithm. Here are ten classic sorting algorithms to explain. Taoist friends who don't know can come here to sweep away their blindness. From "rookie tutorial".
explain
sorting algorithms can be divided into internal sorting ...
Added by Cloud9247 on Fri, 18 Feb 2022 00:03:49 +0200
Annotation and its function in java
1. What are java annotations
Annotation, as the name suggests, is to add notes to something, which will store some information, which may be very useful for a certain period of time in the future. Java annotation is also called Java annotation. Java provides a set of mechanism, which enables us to add annotations (i.e. attach some informat ...
Added by stuartshields on Thu, 17 Feb 2022 23:55:16 +0200
netty series: channel and channelGroup
brief introduction
Channel is not only the channel of data transmission and data processing in netty, but also an indispensable part of netty program. In netty, channel is an interface, which has different implementations for different data types or protocols.
Although channel is very important, it is really mysterious in the code. Basica ...
Added by mitzleah on Thu, 17 Feb 2022 23:43:14 +0200
Is your landing interface really secure?
When you learn to write programs, the first line of code is hello world. But when you start learning WEB background technology, many people's first function is to write login (whisper: I don't know others, but I am anyway).
However, when I interviewed or communicated with many students with a short working experience, I found that many student ...
Added by melbell on Thu, 17 Feb 2022 23:41:13 +0200