-
大小: 860KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-05-08
- 语言: Java
- 标签: commons-lang
资源简介
java 开发工具commons-lang3-3.0 源码包,有import org.apache.commons.lang3.StringUtils;
org.apache.commons.lang3.reflect.FieldUtils;等源码
代码片段和文件信息
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License Version 2.0
* (the “License“); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.lang3;
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringstyle;
/**
* Helper methods for working with {@link Annotation} instances.
*
* This class contains various utility methods that make working with
* annotations simpler.
*
* {@link Annotation} instances are always proxy objects; unfortunately
* dynamic proxies cannot be depended upon to know how to implement certain
* methods in the same manner as would be done by “natural“ {@link Annotation}s.
* The methods presented in this class can be used to avoid that possibility. It
* is of course also possible for dynamic proxies to actually delegate their
* e.g. {@link Annotation#equals(object)}/{@link Annotation#hashCode()}/
* {@link Annotation#toString()} implementations to {@link AnnotationUtils}.
*
* #ThreadSafe#
*
* @since 3.0
* @version $Id: AnnotationUtils.java 1083850 2011-03-21 15:59:10Z mbenson $
*/
public class AnnotationUtils {
/**
* A style that prints annotations as recommended.
*/
private static final ToStringstyle TO_STRING_style = new ToStringstyle() {
/** Serialization version */
private static final long serialVersionUID = 1L;
{
setDefaultFullDetail(true);
setArrayContentDetail(true);
setUseClassName(true);
setUseShortClassName(true);
setUseIdentityHashCode(false);
setContentStart(“(“);
setContentEnd(“)“);
setFieldSeparator(“ “);
setArrayStart(“[“);
setArrayEnd(“]“);
}
/**
* {@inheritDoc}
*/
@Override
protected String getShortClassName(java.lang.Class> cls) {
Class extends Annotation> annotationType = null;
for (Class> iface : ClassUtils.getAllInterfaces(cls)) {
if (Annotation.class.isAssignableFrom(iface)) {
@SuppressWarnings(“unchecked“)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-11-09 23:06 commons-lang3-3.1-src\
文件 1847 2011-09-01 16:36 commons-lang3-3.1-src\checkst
文件 16711 2011-11-09 22:56 commons-lang3-3.1-src\pom.xm
文件 4336 2011-04-10 08:53 commons-lang3-3.1-src\findbugs-exclude-filter.xm
文件 1795 2011-11-09 08:14 commons-lang3-3.1-src\RELEASE-NOTES.txt
文件 11653 2011-07-18 20:32 commons-lang3-3.1-src\build.xm
文件 11358 2005-02-26 05:08 commons-lang3-3.1-src\LICENSE.txt
文件 301 2011-01-16 14:36 commons-lang3-3.1-src\NOTICE.txt
文件 2853 2011-11-09 22:56 commons-lang3-3.1-src\default.properties
文件 1441 2011-10-03 13:41 commons-lang3-3.1-src\build.properties.sample
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\assembly\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\resources\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\time\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\tuple\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\concurrent\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\exception\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\builder\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\event\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\text\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\text\translate\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\mutable\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\math\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\reflect\
目录 0 2011-11-09 22:57 commons-lang3-3.1-src\src\test\java\org\apache\commons\lang3\reflect\testbed\
............此处省略299个文件信息
评论
共有 条评论