All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.javaruntype.type.TypeParameter Maven / Gradle / Ivy

/*
 * =============================================================================
 * 
 *   Copyright (c) 2009, The JAVARUNTYPE team (http://www.javaruntype.org)
 * 
 *   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.javaruntype.type;

import java.io.Serializable;

/**
 * 

* Abstract class that represents a type parameter in a {@link Type} object. *

*

* TypeParameter objects, depending on its specific subclass, can represent: *

*
    *
  • List<?> ({@link WildcardTypeParameter}) *
  • List<String> or List<List<String>> ({@link StandardTypeParameter}) *
  • List<? extends Number> ({@link ExtendsTypeParameter}) *
  • List<? super Integer> ({@link SuperTypeParameter}) *
* * @since 1.0 * * @author Daniel Fernández * */ public abstract class TypeParameter implements Serializable { private static final long serialVersionUID = 1666015437003002214L; /** *

* Returns the type contained in the parameter. It will raise an exception * for wildcard type parameters (?). *

* * @return the type contained in the parameter. */ public abstract Type getType(); abstract boolean isAssignableFrom(final TypeParameter typeParameter); TypeParameter() { super(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy