Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to search functions that have return type = InputStream?

Posted on 2010-11-26
2
Medium Priority
?
276 Views
Last Modified: 2012-05-10

How to search functions that have return type = InputStream?
0
Comment
Question by:Hoboly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 26

Assisted Solution

by:ksivananth
ksivananth earned 1000 total points
ID: 34216085
follow this example to get list of all declared methods, http://java.sun.com/developer/technicalArticles/ALT/Reflection/

then travers through the methods array and check the return type of eache methis is a type of yours,

method.getReturnType() ;
0
 
LVL 26

Accepted Solution

by:
ksivananth earned 1000 total points
ID: 34216112
for e.g.,

Class<?> cls = method.getReturnType() ;
if( cls.isAssignableFrom( InputStream.class ) )
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question