Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2005-2015 Red Hat, Inc. Red Hat 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 io.fabric8.cdi.bean;
 
 
 import java.util.List;
 import java.util.Set;
 
 public abstract class BaseBean<T> implements Bean<T>, PassivationCapable {
 
     private static final Annotation[] DEFAULT_QUALIFIERS = {
             new AnnotationLiteral<Default>() {
             },
             new AnnotationLiteral<Any>() {
             }
     };
 
     private Type beanType;
     private final String name;
     private final Set<Typetypes;
     private final Set<Annotationqualifiers;
 
     public BaseBean(String nameAnnotation... annotations) {
         this. = name;
         ParameterizedType genericSuperclass = (ParameterizedTypegetClass().getGenericSuperclass();
         this. = (Class<T>) genericSuperclass.getActualTypeArguments()[0];
         List<TypeallTypes = new ArrayList<>();
         allTypes.add();
 
         for (Type t = Types.superClassOf(); !allTypes.contains(Object.class) && t != nullt =   Types.superClassOf()) {
             allTypes.add(t);
         }
 
          = Collections.unmodifiableSet(new HashSet<>(allTypes));
          = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(annotations)));
     }
 
     public BaseBean(String name) {
         this. = name;
         ParameterizedType genericSuperclass = (ParameterizedTypegetClass().getGenericSuperclass();
         this. = (Class<T>) genericSuperclass.getActualTypeArguments()[0];
         List<TypeallTypes = new ArrayList<>();
         allTypes.add();
 
         for (Type t = Types.superClassOf(); !allTypes.contains(Object.class) && t != nullt =   Types.superClassOf()) {
             allTypes.add(t);
         }
 
          = Collections.unmodifiableSet(new HashSet<>(allTypes));
          = Collections.unmodifiableSet(new HashSet<>(Arrays.asList()));
     }
 
     public BaseBean(String nameType beanTypeAnnotation ... annotations) {
         this. = name;
         this. = beanType;
         List<TypeallTypes = new ArrayList<>();
         allTypes.add(beanType);
 
         for (Type t = Types.superClassOf(beanType); !allTypes.contains(Object.class) && t != nullt =   Types.superClassOf(beanType)) {
             allTypes.add(t);
         }
 
          = Collections.unmodifiableSet(new HashSet<>(allTypes));
          = Collections.unmodifiableSet(new HashSet<>(Arrays.asList(annotations)));
     }
 
     @Override
     public String getName() {
         return ;
     }
 
    @Override
    public Class<?> getBeanClass() {
        return Types.asClass();
    }
    @Override
    public String getId() {
        return getName();
    }
    @Override
        return Collections.emptySet();
    }
    @Override
    public boolean isNullable() {
        return false;
    }
    @Override
    public Set<TypegetTypes() {
        return ;
    }
    @Override
    public Set<AnnotationgetQualifiers() {
        return ;
    }
    @Override
    public Class<? extends AnnotationgetScope() {
        return ApplicationScoped.class;
    }
    @Override
    public Set<Class<? extends Annotation>> getStereotypes() {
        return Collections.emptySet();
    }
    @Override
    public boolean isAlternative() {
        return false;
    }
New to GrepCode? Check out our FAQ X