?
Solved

check if a field references a container class

Posted on 2004-10-15
6
Medium Priority
?
250 Views
Last Modified: 2010-03-31
How do you check if a field references a container class - that points to a reference collection?

**If possible, use the following BCEL API
http://jakarta.apache.org/bcel/apidocs/index.html

0
Comment
Question by:bcsmess
  • 4
6 Comments
 
LVL 11

Accepted Solution

by:
cjjclifford earned 1600 total points
ID: 12320702
BECL specific - get the JavaClass for an instance of the Field you are interested in, use getAllInterfaces() to get all the interfaces, and check if one is java.util.Collection.

Can I ask what you are trying to do using BCEL - you have several open questions all around the same area, perhaps if you post a question about the overall problems/program you are trying to work with, people here might be in a better position to suggest solutions...
0
 
LVL 14

Expert Comment

by:Tommy Braas
ID: 12320718
Hi bcsmess,

More home work...?

Cheers!

\tt
0
 

Author Comment

by:bcsmess
ID: 12320904
by check if one is java.util.collection, do i use instance of java.util.Collection?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:cjjclifford
ID: 12321223
can you answer my query about what you are trying to do overall (or is this homework as orangehead asks, in multiple questions...)
0
 
LVL 11

Expert Comment

by:cjjclifford
ID: 12321240
regarding how to check - did you read the javadoc that you posted? Its quite straightforward...
0
 
LVL 11

Expert Comment

by:cjjclifford
ID: 12321247
... just use the interface name...
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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 had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month15 days, 1 hour left to enroll

840 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