001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau;
018
019import java.util.*;
020
021import org.apache.juneau.annotation.*;
022
023/**
024 * Same as {@link BeanMeta}, except the list of bean properties are limited by a  {@link Beanp#properties() @Beanp(properties)} annotation.
025 *
026 *
027 * @param <T> The class type that this metadata applies to.
028 */
029public class BeanMetaFiltered<T> extends BeanMeta<T> {
030
031   /**
032    * Wrapper constructor.
033    *
034    * @param innerMeta The untransformed bean meta of the bean property.
035    * @param pNames The list of transformed property names.
036    */
037   public BeanMetaFiltered(BeanMeta<T> innerMeta, Collection<String> pNames) {
038      this(innerMeta, pNames.toArray(new String[pNames.size()]));
039   }
040
041   /**
042    * Wrapper constructor.
043    *
044    * @param innerMeta The untransformed bean meta of the bean property.
045    * @param pNames The list of transformed property names.
046    */
047   public BeanMetaFiltered(BeanMeta<T> innerMeta, String[] pNames) {
048      super(innerMeta.getClassMeta(), innerMeta.getBeanFilter(), pNames, null);
049   }
050}