a我考网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 321|回复: 0

[其他] JAVA技巧:Java反射机制获取内部类的静态成员

[复制链接]
发表于 2012-8-4 12:28:23 | 显示全部楼层 |阅读模式
 比来需要些一个可设置装备摆设的索引构建轨范,需要在运行时挪用Lucene包的如下类及其成员:   引用
& X( @4 j$ t4 A! E; x3 r1 A  Nested Class Summary
8 u0 C" B( p* H0 Z2 T  static class Field.Index
, Y$ i& {" ?2 A# @3 d! P% a2 }. B4 A  Specifies whether and how a field should be indexed./ u; I: c/ B7 L7 R3 ]0 F
  static class Field.Store. Y5 M. I1 {# o% Q+ m
  Specifies whether and how a field should be stored.
' X% }& F# S# |) n0 \) Y- m  static class Field.TermVector! z8 ^3 {# j- D) S) Q, Q" g9 ~
  Specifies whether and how a field should have term vectors.% p3 d1 W8 y4 D8 W3 s
  lucene api中称之为Nested Class,意为嵌套类,而嵌套类内部的File.Index的成员又是静态成员。" ^1 r" B  ~- Z$ d- k+ i
  引用  S" j5 N: W" d$ ]
  Field Summary
  \$ @8 A, t* M9 ?/ e  static Field.Index ANALYZED
4 e& f! y4 ]" c% n" o* x  Index the tokens produced by running the field's value through an Analyzer.
* O* ~- c; ^) u+ T5 v: z  static Field.Index ANALYZED_NO_NORMS
4 d# Z  a0 O4 b/ G  Expert: Index the tokens produced by running the field's value through an Analyzer, and also separately disable the storing of norms.
( I$ e% d  H" _* H6 i4 i  static Field.Index NO  U# `4 y. m: M% _; e
  Do not index the field value.* N5 K& T; z' \. w
  static Field.Index NO_NORMS1 p* X+ W) ]0 P( X% V
  Deprecated. This has been renamed to NOT_ANALYZED_NO_NORMS7 J9 x9 g- V" ]
  static Field.Index NOT_ANALYZED1 O5 H+ i& F' j- X- r
  Index the field's value without using an Analyzer, so it can be searched.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Woexam.Com ( 湘ICP备18023104号 )

GMT+8, 2024-5-21 18:04 , Processed in 0.405318 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表