[Weave message Frame] [Java Core Technology] Dynamic agent Introduction

Source: Internet
Author: User

Because Java is a strongly typed static language, it is not possible to generate code dynamically at execution time, which is essentially the case for static languages.

There are several benefits of dynamically generating code, as well as the advantages of weakly typed languages

1. Partial logic allows for hot updates

2. Remote call implementations are ideal for

3. Can dynamically generate extension classes, shielding complexity, on the original basis to extend the function, no damage to the source code features

Static language is not a solution to the problem, there are many solutions.

Embedded in a scripting engine language, it can compensate, and dynamic agent technology

The dynamic agent that comes with JDK is a solution

Cglib Dynamic agent Spring is used by default

Javassit can modify class at execution time

By the way, the Scala language can inherit a class during execution, and this syntax supports a lot of flexibility for many scenarios, and I believe that Java will be added later

[Weave message Frame] [Java Core Technology] Dynamic agent Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.