com.thoughtworks.qdox.model.JavaMember Maven / Gradle / Ivy
package com.thoughtworks.qdox.model;
/*
* 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.
*/
import java.util.List;
/**
* JavaModel representation of a {@link java.lang.reflect.Member} including related methods of {@link java.lang.reflect.Modifier}
*
* @author Robert Scholte
* @since 2.0
*/
public interface JavaMember
{
/**
* Equivalent of {@link java.lang.reflect.Member#getModifiers()}
*
* This does not follow the java-api
* With the Member-class, getModifiers returns an int
, which should be decoded with the Modifier.
* If this member was extracted from a source, it will keep its order.
* Otherwise if will be in the preferred order of the java-api.
*
* @return all modifiers is this member
*/
List getModifiers();
/**
* Equivalent of {@link java.lang.reflect.Member#getDeclaringClass()}
*
* @return the declaring class
*/
JavaClass getDeclaringClass();
/**
* Equivalent of {@link java.lang.reflect.Member#getName()}
*
* @return the name of this member
*/
String getName();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isAbstract(int)}
*
* @return true
if this member is abstract
, otherwise false
*/
boolean isAbstract();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isFinal(int)}
*
* @return true
is this member is final
, otherwise false
*/
boolean isFinal();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isNative(int)}
*
* @return true
if this member is native
, otherwise false
*/
boolean isNative();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isPrivate(int)}
*
* @return true
if this member is private
, otherwise false
*/
boolean isPrivate();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isProtected(int)}
*
* @return true
if this member is protected
; otherwise false
*/
boolean isProtected();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isPublic(int)}
*
* @return true
if this member is public
, otherwise false
*/
boolean isPublic();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isStatic(int)}
*
* @return true
if this member is static
, otherwise false
*/
boolean isStatic();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isStrict(int)}
*
* @return true
if this member is strictfp
, otherwise false
*/
boolean isStrictfp();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isSynchronized(int)}
*
* @return true
if this member is synchronized
, otherwise false
*/
boolean isSynchronized();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isTransient(int)}
*
* @return true
if this member is transient
, otherwise false
*/
boolean isTransient();
/**
* Equivalent of {@link java.lang.reflect.Modifier#isVolatile(int)}
*
* @return true
if this member is volatile
, otherwise false
*/
boolean isVolatile();
}