Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat, Inc., and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed 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.jboss.weld.introspector.jlr;
import org.jboss.weld.exceptions.WeldException;
import org.jboss.weld.introspector.TypeClosureLazyValueHolder;
import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.introspector.WeldField;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.util.LazyValueHolder;
import org.jboss.weld.util.reflection.Formats;
import org.jboss.weld.util.reflection.Reflections;
import org.jboss.weld.util.reflection.SecureReflections;
import javax.enterprise.inject.spi.AnnotatedField;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
import java.util.Map;
import java.util.Set;
import static org.jboss.weld.logging.messages.UtilMessage.ACCESS_ERROR_ON_FIELD;
/**
* Represents an annotated field
*
* This class is immutable, and therefore threadsafe
*
* @param
* @author Pete Muir
*/
public class WeldFieldImpl extends AbstractWeldMember implements WeldField {
// The underlying field
private final Field field;
public static WeldFieldImpl of(Field field, WeldClass declaringClass, ClassTransformer classTransformer) {
return new WeldFieldImpl(field, Reflections.>cast(field.getType()), field.getGenericType(), new TypeClosureLazyValueHolder(field.getGenericType()), buildAnnotationMap(field.getAnnotations()), buildAnnotationMap(field.getDeclaredAnnotations()), declaringClass, classTransformer);
}
public static WeldFieldImpl, X> of(AnnotatedField super X> annotatedField, WeldClass declaringClass, ClassTransformer classTransformer) {
return new WeldFieldImpl