check if a field references a container class

How do you check if a field references a container class - that points to a reference collection?

**If possible, use the following BCEL API

Who is Participating?
cjjcliffordConnect With a Mentor Commented:
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...
Tommy BraasCommented:
Hi bcsmess,

More home work...?


bcsmessAuthor Commented:
by check if one is java.util.collection, do i use instance of java.util.Collection?
7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

can you answer my query about what you are trying to do overall (or is this homework as orangehead asks, in multiple questions...)
regarding how to check - did you read the javadoc that you posted? Its quite straightforward...
... just use the interface name...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.