• 【转】java编程思想第20章的注解例子用到的com.sun.mirror的jar包


    Java編程思想》中的注解代码中引入过这么一个包(com.sun.mirror),书上说的是在Jdk中有个tools.jar中,引入这个包就每这个问题了,但是笔者用的是JDK 1.8,把这个包import进来,代码还是一批报错。

    实在没办法就在网上找,于是找到了apt-mirror-api-0.1.jar,它包含了以下内容:

    Files contained in apt-mirror-api-0.1.jar:

    META-INF/MANIFEST.MF 
    META-INF/maven/com.moparisthebest.aptIn16/apt-mirror-api/pom.properties 
    META-INF/maven/com.moparisthebest.aptIn16/apt-mirror-api/pom.xml 
    com.sun.mirror.apt.AnnotationProcessor.class 
    com.sun.mirror.apt.AnnotationProcessorEnvironment.class 
    com.sun.mirror.apt.AnnotationProcessorFactory.class 
    com.sun.mirror.apt.AnnotationProcessorListener.class 
    com.sun.mirror.apt.AnnotationProcessors.class 
    com.sun.mirror.apt.Filer.class com.sun.mirror.apt.Messager.class 
    com.sun.mirror.apt.RoundCompleteEvent.class 
    com.sun.mirror.apt.RoundCompleteListener.class 
    com.sun.mirror.apt.RoundState.class 
    com.sun.mirror.declaration.AnnotationMirror.class 
    com.sun.mirror.declaration.AnnotationTypeDeclaration.class 
    com.sun.mirror.declaration.AnnotationTypeElementDeclaration.class 
    com.sun.mirror.declaration.AnnotationValue.class 
    com.sun.mirror.declaration.ClassDeclaration.class 
    com.sun.mirror.declaration.ConstructorDeclaration.class 
    com.sun.mirror.declaration.Declaration.class 
    com.sun.mirror.declaration.EnumConstantDeclaration.class 
    com.sun.mirror.declaration.EnumDeclaration.class 
    com.sun.mirror.declaration.ExecutableDeclaration.class 
    com.sun.mirror.declaration.FieldDeclaration.class 
    com.sun.mirror.declaration.InterfaceDeclaration.class 
    com.sun.mirror.declaration.MemberDeclaration.class 
    com.sun.mirror.declaration.MethodDeclaration.class 
    com.sun.mirror.declaration.Modifier.class 
    com.sun.mirror.declaration.PackageDeclaration.class 
    com.sun.mirror.declaration.ParameterDeclaration.class 
    com.sun.mirror.declaration.TypeDeclaration.class 
    com.sun.mirror.declaration.TypeParameterDeclaration.class 
    com.sun.mirror.type.AnnotationType.class 
    com.sun.mirror.type.ArrayType.class 
    com.sun.mirror.type.ClassType.class 
    com.sun.mirror.type.DeclaredType.class 
    com.sun.mirror.type.EnumType.class 
    com.sun.mirror.type.InterfaceType.class 
    com.sun.mirror.type.MirroredTypeException.class 
    com.sun.mirror.type.MirroredTypesException.class 
    com.sun.mirror.type.PrimitiveType.class 
    com.sun.mirror.type.ReferenceType.class 
    com.sun.mirror.type.TypeMirror.class 
    com.sun.mirror.type.TypeVariable.class 
    com.sun.mirror.type.VoidType.class 
    com.sun.mirror.type.WildcardType.class 
    com.sun.mirror.util.DeclarationFilter.class 
    com.sun.mirror.util.DeclarationScanner.class 
    com.sun.mirror.util.DeclarationVisitor.class 
    com.sun.mirror.util.DeclarationVisitors.class 
    com.sun.mirror.util.Declarations.class 
    com.sun.mirror.util.SimpleDeclarationVisitor.class 
    com.sun.mirror.util.SimpleTypeVisitor.class 
    com.sun.mirror.util.SourceOrderDeclScanner.class 
    com.sun.mirror.util.SourcePosition.class 
    com.sun.mirror.util.TypeVisitor.class com.sun.mirror.util.Types.class

    把这个包引进代码中就可以了。

  • 相关阅读:
    Treap 树堆 容易实现的平衡树
    (转)Maven实战(二)构建简单Maven项目
    (转)Maven实战(一)安装与配置
    根据请求头跳转判断Android&iOS
    (转)苹果消息推送服务器 php 证书生成
    (转)How to renew your Apple Push Notification Push SSL Certificate
    (转)How to build an Apple Push Notification provider server (tutorial)
    (转)pem, cer, p12 and the pains of iOS Push Notifications encryption
    (转)Apple Push Notification Services in iOS 6 Tutorial: Part 2/2
    (转)Apple Push Notification Services in iOS 6 Tutorial: Part 1/2
  • 原文地址:https://www.cnblogs.com/didiaoxiong/p/9115316.html
Copyright © 2020-2023  润新知